Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A343026 a(n) is the smallest positive integer such that there exists no positive integer k with 2k < n where a(n-2k)*a(n-k)=a(n). 1
1, 1, 2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 1, 1, 2, 3, 3, 2, 4, 4, 2, 4, 4, 2, 3, 3, 2, 1, 1, 2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 1, 1, 2, 3, 3, 2, 4, 4, 2, 4, 4, 2, 3, 3, 2, 5, 5, 2, 5, 5, 2, 3, 3, 2, 5, 5, 2, 5, 5, 2, 3, 3, 2, 4, 4, 2, 4, 4, 2, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
a(1) = 1, a(2) = 1, but a(3) != 1 because if a(3) = 1, a(1)*a(2)=a(3). Therefore, a(3) = 2, and so on.
PROG
(Python)
#generates first x digits of sequence
def seq(x):
a = []
excluded = {}
for n in range(x):
if n == 0 or n == 1:
a.append(1)
else:
m = 1
while m in excluded[n]:
m += 1
a.append(m)
for i in range(n):
j = 2 * n - i
k = a[i] * a[n]
if j in excluded and k not in excluded[j]:
excluded[j].append(k)
else:
excluded[j] = [k]
return a
(PARI) isok(v, n, j) = {for (k=1, n, if (n-2*k<=0, break); if (v[n-2*k]*v[n-k] == j, return (0)); ); return (1); }
nextv(v, n) = {my(j=1); while (!isok(v, n, j), j++); j; }
lista(nn) = {my(v = vector(nn)); v[1] = 1; for (n=2, nn, v[n] = nextv(v, n); ); v; } \\ Michel Marcus, Apr 04 2021
CROSSREFS
Sequence in context: A128495 A328062 A326281 * A113136 A156267 A160325
KEYWORD
nonn
AUTHOR
Daniel von Savoye, Apr 02 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 19:11 EDT 2024. Contains 375273 sequences. (Running on oeis4.)