[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a348440 -id:a348440
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(1)=1, a(2)=1; for n>2, a(n) is the smallest positive integer such that the products a(i)*a(i+1), i=1..n-1, are all distinct.
+10
26
1, 1, 2, 2, 3, 1, 5, 2, 4, 3, 3, 5, 4, 4, 6, 3, 7, 1, 11, 2, 7, 4, 8, 5, 5, 6, 6, 7, 5, 9, 3, 11, 4, 12, 5, 10, 7, 7, 8, 8, 9, 6, 11, 5, 13, 1, 17, 2, 13, 3, 17, 4, 13, 6, 14, 7, 9, 9, 10, 8, 11, 7, 13, 8, 12, 9, 11, 10, 10, 12, 11, 11, 13, 9, 14, 8, 16, 9
OFFSET
1,3
COMMENTS
A088178 is the sequence of distinct products a(i)a(i+1), i=1,2,3,... and appears to be a permutation of the natural numbers.
It appears that for k>2 the k-th occurrence of 1 lies between the first occurrences of primes p(2*k-4) and p(2*k-3). For instance, the 5th occurrence of 1 lies between the first occurrences of 13 and 17, the 6th and 7th primes, respectively. - John W. Layman, Nov 16 2011
Note that a(n) = 1 for infinitely many n, because the sequence a(n) is not bounded and beside every new prime number must be the number 1. - Thomas Ordowski, Sep 04 2014. [This seems a rather sketchy argument, but I have a more complete proof using arguments similar to those we used in A098550. - N. J. A. Sloane, Oct 18 2021]
Example: ..., 5, 13, 1, 17, 2, 13, 3, 17, 4; ...
General: ..., k, p, 1, q, 2, p, 3, q, ..., k-1; ...
- Thomas Ordowski, Sep 08 2014
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000, (first 1000 terms from T. D. Noe)
FORMULA
a(n)*gcd(a(n-1),a(n+1)) = gcd(A088178(n-1),A088178(n)). - Thomas Ordowski, Jun 29 2015
EXAMPLE
Given that the sequence begins 1,1,2,2,... then a(5)=3, since either of the choices a(5)=1 or a(5)=2 would lead to a repetition of one of the previous products 1,2,4 of adjacent pairs of terms.
MAPLE
A[1]:= 1: A[2]:= 1: S:= {1}:
for n from 3 to 100 do
Sp:= select(type, map(s -> s/A[n-1], S), integer);
if nops(Sp) = Sp[-1] then A[n]:= Sp[-1]+1
else A[n]:= min({$1..Sp[-1]} minus Sp)
fi;
S:= S union {A[n-1]*A[n]};
od:
seq(A[n], n=1..100); # Robert Israel, Aug 28 2014
MATHEMATICA
t = {1, 1}; Do[AppendTo[t, 1]; While[Length[Union[Most[t]*Rest[t]]] < n - 1, t[[-1]]++], {n, 3, 100}]; t (* T. D. Noe, Nov 16 2011 *)
PROG
(Python)
from itertools import islice
def A088177(): # generator of terms
yield 1
yield 1
p, a = {1}, 1
while True:
n = 1
while n*a in p:
n += 1
p.add(n*a)
a = n
yield n
A088177_list = list(islice(A088177(), 20)) # Chai Wah Wu, Oct 21 2021
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
John W. Layman, Sep 22 2003
STATUS
approved
Indices of records in A088177.
+10
3
1, 3, 5, 7, 15, 17, 19, 34, 45, 47, 83, 85, 165, 169, 171, 181, 183, 193, 195, 205, 207, 533, 535, 561, 563, 585, 587, 784, 786, 1040, 1042, 1068, 1070, 1096, 1098, 1126, 1128, 1150, 1152, 1932, 1934, 1986, 1988, 2022, 2024, 2062, 2064, 2090, 2092, 2118, 2120, 2146, 2148, 2178, 2180, 2206, 2208
OFFSET
1,2
LINKS
MATHEMATICA
Block[{a, c, m = 1, n}, a = {1}~Join~Reap[Do[n = 1; While[IntegerQ[c[m n]], n++]; Sow[n]; Set[c[m n], i]; m = n, {i, 3000}]][[-1, -1]]; Map[FirstPosition[a, #][[1]] &, Union@ FoldList[Max, a]]] (* Michael De Vlieger, Oct 21 2021 *)
PROG
(Python)
from itertools import islice
def A348441(): # generator of terms
yield 1
c, p, a, i = 1, {1}, 1, 2
while True:
n, na = 1, a
while na in p:
n += 1
na += a
p.add(na)
a = n
i += 1
if c < n:
c = n
yield i
A348441_list = list(islice(A348441(), 100)) # Chai Wah Wu, Oct 21 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 21 2021
STATUS
approved
Records in A088178.
+10
3
1, 2, 4, 6, 10, 12, 15, 20, 24, 28, 32, 40, 42, 45, 48, 60, 70, 72, 78, 84, 98, 104, 108, 110, 120, 132, 143, 144, 147, 152, 160, 168, 189, 190, 198, 204, 209, 228, 234, 240, 256, 272, 280, 300, 304, 306, 323, 342, 360, 364, 378, 392, 420, 425, 450, 456, 460, 475, 500, 504, 506, 525, 550, 552, 575
OFFSET
1,2
PROG
(Python)
from itertools import islice
def A348442(): # generator of terms
yield 1
c, p, a = 1, {1}, 1
while True:
n, na = 1, a
while na in p:
n += 1
na += a
p.add(na)
a = n
if c < na:
c = na
yield c
A348442_list = list(islice(A348442(), 100)) # Chai Wah Wu, Oct 21 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 21 2021
STATUS
approved
Indices of records in A088178.
+10
3
1, 2, 3, 4, 7, 9, 11, 12, 14, 21, 22, 23, 27, 29, 33, 34, 36, 40, 53, 54, 55, 63, 65, 67, 69, 70, 72, 77, 93, 96, 99, 100, 101, 108, 111, 119, 121, 122, 124, 130, 131, 132, 140, 147, 149, 151, 153, 154, 156, 217, 237, 238, 239, 257, 258, 260, 263, 265, 266, 268, 272, 274, 275, 277, 279, 280
OFFSET
1,2
PROG
(Python)
from itertools import islice
def A348443(): # generator of terms
yield 1
c, p, a, i = 1, {1}, 1, 1
while True:
n, na = 1, a
while na in p:
n += 1
na += a
p.add(na)
a = n
i += 1
if c < na:
c = na
yield i
A348443_list = list(islice(A348443(), 100)) # Chai Wah Wu, Oct 21 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 21 2021
STATUS
approved

Search completed in 0.007 seconds