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-10 of 12 results. Next

A299957 The sum a(n) + a(n+1) always has at least one digit "1". Lexicographically first such sequence of nonnegative integers without duplicate term.

Original entry on oeis.org

0, 1, 9, 2, 8, 3, 7, 4, 6, 5, 10, 11, 20, 21, 30, 31, 40, 41, 50, 51, 49, 12, 19, 22, 29, 32, 39, 42, 58, 13, 18, 23, 28, 33, 38, 43, 48, 52, 53, 47, 14, 17, 24, 27, 34, 37, 44, 56, 15, 16, 25, 26, 35, 36, 45, 46, 54, 55, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80
Offset: 0

Views

Author

Eric Angelini, Feb 22 2018

Keywords

Comments

The sequence starts with a(0) = 0 and is always extended with the smallest integer not yet present that does not lead to a contradiction. The sequence is a permutation of the natural numbers.
Originally the sequence was defined starting with a(1) = 1 and using only positive integers. This leads to the same sequence restricted to positive indices, which yields a permutation of the positive integers. - M. F. Hasler, Feb 28 2018

Examples

			1 + 9 = 10; 9 + 2 = 11; 2 + 8 = 10; 8 + 3 = 11; 3 + 7 = 10; 7 + 4 = 11; 4 + 6 = 10; 6 + 5 = 11; etc.
		

Crossrefs

Cf. A299952 (different constraint: a(n) + a(n+1) must be substring of concatenation of a(1..n+1)).
Cf. A299970, A299982, ..., A299988, A299969 (nonnegative analog with digit 0, 2, ..., 9), A299971, A299972, ..., A299979 (positive analog with digit 0, 2, ..., 9).
Cf. A299980, A299981, A299402, A299403, A298974, A298975, A299996, A299997, A298978, A298979 for the analog using multiplication: a(n)*a(n+1) has a digit 0, resp. 1, ..., resp. 9.

Programs

  • Mathematica
    Nest[Append[#, Block[{k = 1}, While[Nand[FreeQ[#, k], DigitCount[k + #[[-1]], 10, 1] > 0], k++]; k]] &, {1}, 98] (* Michael De Vlieger, Feb 22 2018 *)
  • PARI
    a(n, f=1, a=0, u=[a])={for(n=a+1, n, f&&if(f==1,print1(a","),write(f,n-1," "a)); for(k=u[1]+1, oo, setsearch(u, k)&&next; setsearch(Set(digits(a+k)),1)&&(a=k)&&break); u=setunion(u, [a]); u[2]==u[1]+1&&u=u[^1]); a} \\ M. F. Hasler, Feb 22 2018

Extensions

Extended to a(0) = 0 by M. F. Hasler, Feb 28 2018

A299969 Lexicographic first sequence of nonnegative integers such that a(n) + a(n+1) has a digit 9, and no term occurs twice.

Original entry on oeis.org

0, 9, 10, 19, 20, 29, 30, 39, 40, 49, 41, 8, 1, 18, 11, 28, 21, 38, 31, 48, 42, 7, 2, 17, 12, 27, 22, 37, 32, 47, 43, 6, 3, 16, 13, 26, 23, 36, 33, 46, 44, 5, 4, 15, 14, 25, 24, 35, 34, 45, 50, 59, 60, 69, 70, 79, 80, 89, 90, 99, 91, 58, 51, 68, 61, 78, 71, 88, 81, 98, 92, 57, 52, 67, 62, 77, 72, 87, 82, 97, 93, 56, 53, 66, 63, 76, 73, 86, 83, 96, 94
Offset: 0

Views

Author

M. F. Hasler and Eric Angelini, Feb 22 2018

Keywords

Comments

A permutation of the nonnegative integers.
It happens that from a(50) = 50 on, this sequence coincides with the variant A299979 (starting at 1 and having only positive terms). Indeed the two sequences have the property that the terms a(0..49) resp. A299979(1..49) exactly contain all numbers from 0 to 49, respectively 1 to 49. - M. F. Hasler, Feb 28 2018

Crossrefs

Cf. A299979 (analog with positive terms), A299957 (analog with digit 1), A299970, A299982, ..., A299988 (digit 0, 2, ..., 8).
Cf. A299980, A299981, A299402, A299403, A298974, A298975, A299996, A299997, A298978, A298979 for the analog using multiplication: a(n)*a(n+1) has a digit 0, resp. 1, ..., resp. 9.

Programs

  • Mathematica
    Nest[Append[#, Block[{k = 1}, While[Nand[FreeQ[#, k], DigitCount[#[[-1]] + k, 10, 9] > 0], k++]; k]] &, {0}, 90] (* Michael De Vlieger, Mar 01 2018 *)
  • PARI
    a(n,f=1,d=9,a=0,u=[a])={for(n=1,n,f&&if(f==1,print1(a","),write(f,n-1," "a));for(k=u[1]+1,oo,setsearch(u,k)&&next;setsearch(Set(digits(a+k)),d)&&(a=k)&&break);u=setunion(u,[a]);u[2]==u[1]+1&&u=u[^1]);a}

A299970 Lexicographic first sequence of nonnegative integers such that a(n) + a(n+1) has a digit 0, and no term occurs twice.

Original entry on oeis.org

0, 10, 20, 30, 40, 50, 51, 9, 1, 19, 11, 29, 21, 39, 31, 49, 41, 59, 42, 8, 2, 18, 12, 28, 22, 38, 32, 48, 52, 53, 7, 3, 17, 13, 27, 23, 37, 33, 47, 43, 57, 44, 6, 4, 16, 14, 26, 24, 36, 34, 46, 54, 55, 5, 15, 25, 35, 45, 56, 64, 66, 74, 76, 84, 86, 94, 96, 104
Offset: 0

Views

Author

M. F. Hasler and Eric Angelini, Feb 22 2018

Keywords

Comments

It happens that from a(18) = 42 on, the sequence coincides with the "strictly positive variant" A299971. Indeed, n = 18 is the first index for which the same value occurs, and {a(n), 0 <= n < 18} = {0} U {A299971(n), 1 <= n < 18}. - M. F. Hasler, Feb 28 2018

Crossrefs

Cf. A299971 (analog with positive terms), A299957 (digit 1), A299972..A299979 (digit 2..9).
Cf. A299980, A299981, A299402, A299403, A298974, A298975, A299996, A299997, A298978, A298979 for an analog using multiplication: a(n)*a(n+1) has a digit 0, resp. 1, ..., resp. 9.

Programs

  • Mathematica
    Nest[Append[#, Block[{k = 1}, While[Nand[FreeQ[#, k], DigitCount[#[[-1]] + k, 10, 0] > 0], k++]; k]] &, {0}, 67] (* Michael De Vlieger, Mar 01 2018 *)
  • PARI
    a(n,f=1,d=0,a=0,u=[a])={for(n=1,n,f&&if(f==1,print1(a","),write(f,n-1," "a));for(k=u[1]+1,oo,setsearch(u,k)&&next;setsearch(Set(digits(a+k)),d)&&(a=k)&&break);u=setunion(u,[a]);u[2]==u[1]+1&&u=u[^1]);a}

A299972 Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 2, and no term occurs twice.

Original entry on oeis.org

1, 11, 9, 3, 17, 4, 8, 12, 10, 2, 18, 5, 7, 13, 14, 6, 15, 27, 25, 37, 35, 47, 45, 57, 55, 65, 56, 16, 26, 36, 46, 66, 54, 28, 24, 38, 34, 48, 44, 58, 62, 20, 22, 30, 32, 40, 42, 50, 52, 60, 61, 21, 31, 41, 51, 69, 23, 19, 33, 29, 43, 39, 53, 49, 63, 59, 64, 68
Offset: 1

Views

Author

M. F. Hasler and Eric Angelini, Feb 22 2018

Keywords

Comments

A permutation of the positive integers.

Crossrefs

Cf. A299970 (analog with digit 0), A299957 (digit 1), A299973..A299979 (digit 3..9).

Programs

  • PARI
    a(n,f=1,d=2,a=1,u=[a])={for(n=2,n,f&&if(f==1,print1(a","),write(f,n-1," "a));for(k=u[1]+1,oo,setsearch(u,k)&&next;setsearch(Set(digits(a+k)),d)&&(a=k)&&break);u=setunion(u,[a]);u[2]==u[1]+1&&u=u[^1]);a}

A299971 Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 0, and no term occurs twice.

Original entry on oeis.org

1, 9, 11, 19, 21, 29, 31, 39, 41, 49, 51, 50, 10, 20, 30, 40, 60, 42, 8, 2, 18, 12, 28, 22, 38, 32, 48, 52, 53, 7, 3, 17, 13, 27, 23, 37, 33, 47, 43, 57, 44, 6, 4, 16, 14, 26, 24, 36, 34, 46, 54, 55, 5, 15, 25, 35, 45, 56, 64, 66, 74, 76, 84, 86, 94, 96, 104, 97
Offset: 1

Views

Author

M. F. Hasler and Eric Angelini, Feb 22 2018

Keywords

Comments

It happens that from a(18) = 42 on, the sequence coincides with the "nonnegative variant" A299970. Indeed, n = 18 is the first index for which the same value occurs, and {a(n), 1 <= n < 18} U {0} = {A299970(n), 0 <= n < 18}. - M. F. Hasler, Feb 28 2018

Crossrefs

Cf. A299970 (analog with nonnegative terms), A299957 (analog with digit 1), A299972 .. A299979 (digit 2..9).
Cf. A299980, A299981, A299402, A299403, A298974, A298975, A299996, A299997, A298978, A298979 for the analog using multiplication: a(n)*a(n+1) has a digit 0, resp. 1, ..., resp. 9.

Programs

  • Mathematica
    Nest[Append[#, Block[{k = 1}, While[Nand[FreeQ[#, k], DigitCount[k + #[[-1]], 10, 0] > 0], k++]; k]] &, {1}, 67] (* Michael De Vlieger, Feb 22 2018 *)
  • PARI
    a(n,f=1,d=0,a=1,u=[a])={for(n=2,n,f&&if(f==1,print1(a","),write(f,n-1," "a));for(k=u[1]+1,oo,setsearch(u,k)&&next;setsearch(Set(digits(a+k)),d)&&(a=k)&&break);u=setunion(u,[a]);u[2]==u[1]+1&&u=u[^1]);a}

A299952 The sum a(n) + a(n+1) is a substring of the concatenation of all terms up to a(n+1). Lexicographic first sequence of positive integers without duplicate terms having this property.

Original entry on oeis.org

1, 10, 99, 11, 80, 19, 61, 30, 31, 49, 12, 2, 4, 5, 3, 6, 7, 15, 9, 13, 17, 14, 8, 16, 20, 25, 23, 22, 26, 27, 18, 34, 28, 21, 24, 29, 32, 35, 36, 44, 37, 43, 38, 33, 41, 39, 42, 40, 51, 45, 46, 47, 52, 57, 53, 56, 54, 55, 63, 59, 50, 60, 58, 64, 66, 65, 74, 48, 62, 68, 71, 77, 72, 67, 78, 70
Offset: 1

Views

Author

Eric Angelini and Lars Blomberg, Feb 22 2018

Keywords

Comments

The sequence starts with a(1) = 1 and is always extended with the smallest integer not yet present that does not lead to a contradiction.
This is probably a permutation of the natural numbers (after 10000 terms, the smallest integer not yet present is 9990).

Examples

			a(1) + a(2) = 1 + 10 = 11 and “11” is visible in [1,10]
a(2) + a(3) = 10 + 99 = 109 and “109” is visible in [10,99]
a(3) + a(4) = 99 + 11 = 110 and “110” is visible in [1,10]
a(4) + a(5) = 11 + 80 = 91 and “91” is visible in [99,11]
a(5) + a(6) = 80 + 19 = 99 and “99” is visible in [99]
a(6) + a(7) = 19 + 61 = 80 and “80” is visible in [80]
...
		

Crossrefs

Cf. A300000.
For a different constraint on a(n)+a(n+1) (must have a digit '1'), see A299957 and A299970, A299982, ..., A299988, A299969 (nonnegative analog with digit 0, 2, ..., 9), A299971, A299972, ..., A299979 (positive analog with digit 0, 2, ..., 9).
Cf. A299980, A299981, A299402, A299403, A298974, A298975, A299996, A299997, A298978, A298979 for the analog using multiplication: a(n)*a(n+1) has a digit 0, resp. 1, ..., resp. 9.

Programs

  • Mathematica
    Nest[Function[a, Append[a, Block[{k = 1, d}, While[Nand[FreeQ[a, k], SequenceCount[Flatten@ IntegerDigits[Append[a, k]], IntegerDigits[a[[-1]] + k]] > 0], k++]; k]]], {1}, 75] (* Michael De Vlieger, Feb 22 2018 *)
  • PARI
    a(n,show=1,a=1,s=a,u=[a],t,m)={for(n=2,n, show&&print1(a","); for(k=u[1]+1,oo, setsearch(u,k)&&next;m=Mod(a+k,10^#Str(a+k));t=s*10^#Str(k)+k; until(k>=t\=10,t==m&&(a=k)&&break(2)));s=s*10^#Str(a)+a;u=setunion(u,[a]); u[2]==u[1]+1&&u=u[^1]);a} \\ M. F. Hasler, Feb 22 2018

A299973 Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 3, and no term occurs twice.

Original entry on oeis.org

1, 2, 11, 12, 18, 5, 8, 15, 16, 7, 6, 17, 13, 10, 3, 20, 14, 9, 4, 19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 66, 27, 26, 37, 36, 47, 46, 57, 56, 67, 63, 30, 23, 40, 33, 50, 43, 60, 53, 70, 61, 22
Offset: 1

Views

Author

M. F. Hasler and Eric Angelini, Feb 22 2018

Keywords

Comments

A permutation of the positive integers.

Crossrefs

Cf. A299983 (analog with nonnegative terms), A299957 (analog with digit 1), A299970..A299979 (digit 0..9).

Programs

  • PARI
    a(n,f=1,d=3,a=1,u=[a])={for(n=2,n,f&&if(f==1,print1(a","),write(f,n-1," "a));for(k=u[1]+1,oo,setsearch(u,k)&&next;setsearch(Set(digits(a+k)),d)&&(a=k)&&break);u=setunion(u,[a]);u[2]==u[1]+1&&u=u[^1]);a}

A299978 Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 8, and no term occurs twice.

Original entry on oeis.org

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

Views

Author

M. F. Hasler and Eric Angelini, Feb 22 2018

Keywords

Comments

A permutation of the positive integers.

Crossrefs

Cf. A299988 (analog with nonnegative terms), A299957 (analog with digit 1), A299971, A299972, ..., A299979 (digit 0, 2, ..., 9).

Programs

  • PARI
    a(n,f=1,d=8,a=1,u=[a])={for(n=2,n,f&&if(f==1,print1(a","),write(f,n-1," "a));for(k=u[1]+1,oo,setsearch(u,k)&&next;setsearch(Set(digits(a+k)),d)&&(a=k)&&break);u=setunion(u,[a]);u[2]==u[1]+1&&u=u[^1]);a}

A299974 Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 4, and no term occurs twice.

Original entry on oeis.org

1, 3, 11, 13, 21, 19, 5, 9, 15, 25, 16, 8, 6, 18, 22, 2, 12, 28, 14, 10, 4, 20, 23, 17, 7, 27, 37, 47, 57, 67, 73, 31, 33, 41, 43, 51, 53, 61, 63, 71, 69, 35, 29, 45, 39, 55, 49, 65, 59, 75, 66, 38, 26, 48, 36, 58, 46, 68, 56, 78, 62, 32, 42, 52, 72, 70, 24, 30, 34, 40, 44, 50, 54, 60, 64, 76, 88, 86, 98, 96, 108, 106, 118, 116, 124, 80, 74, 90, 84
Offset: 1

Views

Author

M. F. Hasler and Eric Angelini, Feb 22 2018

Keywords

Comments

A permutation of the positive integers.

Crossrefs

Cf. A299984 (analog with nonnegative terms), A299957 (analog with digit 1), A299971, A299972, ..., A299979 (digit 0, 2, ..., 9).

Programs

  • PARI
    a(n,f=1,d=4,a=1,u=[a])={for(n=2,n,f&&if(f==1,print1(a","),write(f,n-1," "a));for(k=u[1]+1,oo,setsearch(u,k)&&next;setsearch(Set(digits(a+k)),d)&&(a=k)&&break);u=setunion(u,[a]);u[2]==u[1]+1&&u=u[^1]);a}

A299975 Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 5, and no term occurs twice.

Original entry on oeis.org

1, 4, 11, 14, 21, 24, 26, 9, 6, 19, 16, 29, 22, 3, 2, 13, 12, 23, 27, 8, 7, 18, 17, 28, 25, 10, 5, 20, 15, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 76, 39, 36, 49, 46, 59, 56, 69, 66, 79, 71, 34, 31, 44, 41, 54, 51, 64, 61, 74, 77, 38, 37, 48, 47, 58, 57, 68, 67, 78, 72, 33, 32, 43, 42, 53, 52, 63, 62, 73, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125
Offset: 1

Views

Author

M. F. Hasler and Eric Angelini, Feb 22 2018

Keywords

Comments

A permutation of the positive integers.

Crossrefs

Cf. A299985 (analog with nonnegative terms), A299957 (analog with digit 1), A299971, A299972, ..., A299979 (digit 0, 2, ..., 9).

Programs

  • PARI
    a(n,f=1,d=5,a=1,u=[a])={for(n=2,n,f&&if(f==1,print1(a","),write(f,n-1," "a));for(k=u[1]+1,oo,setsearch(u,k)&&next;setsearch(Set(digits(a+k)),d)&&(a=k)&&break);u=setunion(u,[a]);u[2]==u[1]+1&&u=u[^1]);a}
Showing 1-10 of 12 results. Next