cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A332072 The Blue Comma sequence: Differences of indices of even terms gives back the sequence; lexicographically earliest such permutation of positive integers.

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 7, 9, 8, 11, 13, 10, 15, 17, 19, 21, 23, 12, 25, 27, 29, 31, 14, 33, 35, 37, 39, 41, 43, 16, 45, 47, 49, 51, 53, 55, 57, 59, 18, 61, 63, 65, 67, 69, 71, 73, 20, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 22, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 24, 119, 121, 123, 125, 127
Offset: 1

Views

Author

Eric Angelini and M. F. Hasler, May 19 2020

Keywords

Examples

			The even terms are at indices 2, 3, 5, 9, 12, 18, 23, 30, ...; first differences give 1, 2, 4, 3, 6, 5, 7, ... = the sequence itself.
		

Crossrefs

Cf. A197756 (the Yellow Comma sequence: count digits between odd terms).

Programs

  • PARI
    upto(N)={my(a=Vec([1,2],N),i=1,L=2); local(U=[2], nxt(e)=while(#U>1&&U[2]==U[1]+1, U=U[^1]); my(t=U[1]); until( t++%2!=e && !setsearch(U,t),); U=setunion(U,[t]);t ); for(n=3,N,a[n]=nxt(n-L==a[i] && i++ && L=n));a}

A334829 The sum a(n) + a(n+1) is visible around the comma that follows a(n+1). See the Comments and Example sections for details.

Original entry on oeis.org

1, 11, 23, 46, 91, 374, 6506, 8801, 53076, 18777, 18533, 73109, 16428, 95371, 117992, 133632, 516246, 4987805, 50405105, 539291005, 896961101, 4362521065, 2594821666, 9573427311, 21682489773, 12559170843, 42416606165, 49757770089, 21743762547, 15015326363, 67590889108, 26062154719, 36530438276, 25925929956
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, May 13 2020

Keywords

Comments

The rule used here is that the rightmost digit of a(n+1) is the first digit of the sum a(n) + a(n+1), the other digits of the said sum being put after the comma in order to start a(n+2).
As no digit 0 (zero) can start a term, one will have to backtrack sometimes in order to extend the sequence - and pick another term for a(n+1), compatible with the above rule. This is always possible.
Note that the sequence is not monotonically increasing as shown by a(10) and a(11) for instance; still, the 1000th term is 406-digit long.
The sequence is always extended with the smallest available integer not yet present that does not lead to a contradiction.

Examples

			a(1) + a(2) is 1 + 11 = 12 and 12 can be seen here: 1(1,2)3,
a(2) + a(3) is 11 + 23 = 34 and 34 can be seen here: 2(3,4)6,
a(3) + a(4) is 23 + 46 = 69 and 69 can be seen here: 4(6,9)1,
a(4) + a(5) is 46 + 91 = 137 and 137 can be seen here: 9(1,37)4,
a(5) + a(6) is 91 + 374 = 465 and 465 can be seen here: 37(4,65)06, etc.
		

Crossrefs

A332073 The Silver Comma sequence: Differences of indices of prime terms gives back the sequence; lexicographically earliest such permutation of positive integers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 12, 11, 14, 15, 16, 18, 13, 20, 21, 22, 24, 25, 17, 26, 27, 28, 30, 32, 33, 34, 19, 35, 36, 38, 39, 40, 42, 23, 44, 45, 46, 48, 49, 50, 51, 52, 29, 54, 55, 56, 57, 58, 60, 62, 63, 64, 31, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 37, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 41
Offset: 1

Views

Author

Eric Angelini and M. F. Hasler, May 19 2020

Keywords

Examples

			The prime terms are at indices 2, 3, 5, 8, 12, 17, 23, 31, 38, 47, 57, 69, 80, 94, ...; first differences give 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 12, 11, 14, ... = the sequence itself.
		

Crossrefs

Cf. A197756 (the Yellow Comma sequence: count digits between odd terms).

Programs

  • PARI
    upto(N)={local(U=[2]); my(a=Vec([1,2],N), i=1, L=2, nxt(p)=while(#U>1 && U[2]==U[1]+1, U=U[^1]); my(t=U[1]); until(if(p, t=nextprime(t+1), !isprime(t+=1)) && !setsearch(U,t),); U=setunion(U,[t]);t); for(n=3,N,a[n]=nxt(n-L==a[i] && i++ && L=n));a}
Showing 1-3 of 3 results.