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!)
A307707 Lexicographically earliest sequence starting with a(1) = 0 such that a(n) is the number of pairs of contiguous terms whose sum is a(n). 2
0, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
In order to avoid the trivial case "0 followed by 1's", the sum of every pair of consecutive terms must appear in the sequence. - Rémy Sigrist, Apr 24 2019
From Paul Curtz, Apr 27 2019: This can be written as a triangle:
0
1 1
1 2 1
2 2 2 2
2 3 2 3 2
3 3 3 3 3 3
3 4 3 4 3 4 3
...
LINKS
FORMULA
a(n) + a(n+1) = A002024(n). - Rémy Sigrist, Apr 24 2019
EXAMPLE
The sequence starts with 0,1,1,1,2,1,2,2,2,2,2,3,2,3,2...
a(1) = 0 means that the sum [a(n) + a(n+1)] is never = 0;
a(2) = 1 means that the sum [a(n) + a(n+1)] = 1 is true only once [this is the sum a(1) + a(2) = 0 + 1 = 1] ;
...
a(5) = 2 means that the sum [a(n) + a(n+1)] = 2 is true only twice [those are the sums a(2) + a(3) = 1 + 1 = 2 and a(3) + a(4) = 1 + 1 = 2];
...
a(12) = 3 means that the sum [a(n) + a(n+1)] = 3 is true only three times [those are the three sums a(4) + a(5) = 1 + 2 = 3; a(5) + a(6) = 2 + 1 = 3 and a(6) + a(7) = 1 + 2 = 3]; etc.
MATHEMATICA
m = 107; a[1]=0;
a24[n_] := Ceiling[(Sqrt[8n+1]-1)/2];
Array[a, m] /. Solve[Table[a[n] + a[n+1] == a24[n], {n, 1, m-1}]][[1]] (* Jean-François Alcover, Jun 02 2019, after Rémy Sigrist's formula *)
PROG
(PARI) v=0; rem=wanted=1; for (n=1, 107, print1 (v", "); v=wanted-v; if (rem--==0, rem=wanted++)) \\ Rémy Sigrist, Apr 23 2019
CROSSREFS
Cf. A002024.
Cf. also A007590, A057353, A106466 and A238410.
A multiplicative version: A307720.
Sequence in context: A106031 A055175 A339930 * A025819 A243866 A110102
KEYWORD
nonn,look
AUTHOR
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 19 11:24 EDT 2024. Contains 375284 sequences. (Running on oeis4.)