A080427 a(1)=1 and, for n>1, a(n) is the smallest positive integer such that the absolute difference |a(n)-a(n-1)| has not occurred previously.
1, 1, 2, 4, 1, 5, 10, 1, 7, 14, 1, 9, 19, 1, 12, 24, 1, 15, 30, 1, 17, 34, 1, 20, 40, 1, 22, 44, 1, 25, 50, 1, 27, 54, 1, 29, 59, 1, 32, 64, 1, 35, 70, 1, 37, 74, 1, 39, 79, 1, 42, 84, 1, 45, 90, 1, 47, 94, 1, 49, 99, 1, 52, 104, 1, 55, 110, 1, 57, 114, 1, 60, 120, 1, 62, 124, 1, 65, 130
Offset: 1
Keywords
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
Programs
-
PARI
{ my(s=0, v=1, d); for (n=1, 79, print1 (v, ", "); for (w=1, oo, if (!bittest(s, d=abs(v-w)), s+=2^d; v=w; break))) } \\ Rémy Sigrist, Apr 12 2020
Formula
It appears that abs(a(n+2)-a(n+1)) = A101544(n) for any n > 0. - Rémy Sigrist, Apr 12 2020
Comments