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!)
A339310 a(n) = a(n-1-a(n-1)) + a(n-a(n-2)) for n>2; starting with a(1) = a(2) = 1. 0
1, 1, 2, 3, 3, 3, 5, 4, 6, 5, 6, 8, 8, 6, 9, 8, 8, 11, 11, 10, 10, 14, 12, 11, 16, 15, 12, 17, 14, 17, 16, 18, 14, 19, 19, 16, 21, 22, 19, 21, 25, 18, 22, 25, 23, 24, 25, 25, 23, 31, 28, 22, 33, 28, 29, 32, 28, 29, 30, 30, 33, 35, 29, 33, 32, 28, 41, 36, 35 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
{a(n)} is the Pinn F 1,0(n) sequence (see link section).
LINKS
K. Pinn, A Chaotic Cousin Of Conway's Recursive Sequence, arXiv:cond-mat/9808031 [cond-mat.stat-mech], 1998.
EXAMPLE
a(3)=2 because a(3) = a(3-1-a(3-1))+a(3-a(3-2)) = a(2-1)+a(3-1) = 1+1 = 2.
MATHEMATICA
a[1] = a[2] = 1; a[n_] := a[n] = a[n - 1 - a[n - 1]] + a[n - a[n - 2]]; Table[ a[n], {n, 1, 40}]
PROG
(Python3)
a=[1, 1]
for n in range(100):
i1=len(a)-1-a[len(a)-1]
i2=len(a)-a[len(a)-2]
if i1>=0 and i2>=0 :
a.append(a[i1]+a[i2])
else :
print("Sequence dies. Contains ", n+2, " terms.")
break
print(a)
(PARI) lista(nn) = {my(va = vector(nn)); va[1] = 1; va[2] = 1; for (n=3, nn, va[n]=va[n-1-va[n-1]]+va[n-va[n-2]]; ); va; } \\ Michel Marcus, Dec 07 2020
CROSSREFS
Sequence in context: A349837 A111912 A096288 * A361159 A184995 A136348
KEYWORD
nonn
AUTHOR
Pablo Hueso Merino, Dec 02 2020
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 April 25 09:56 EDT 2024. Contains 371967 sequences. (Running on oeis4.)