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-2 of 2 results.

A308719 Lexicographically earliest sequence of distinct terms such that the digits of two contiguous terms sum up to a palindrome.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 10, 7, 11, 9, 20, 12, 8, 21, 13, 14, 15, 23, 22, 16, 31, 25, 40, 30, 17, 59, 26, 68, 35, 77, 44, 86, 53, 95, 62, 100, 19, 39, 28, 48, 37, 57, 46, 66, 55, 75, 64, 84, 73, 93, 82, 129, 91, 138, 109, 147, 118, 156, 127, 165, 136, 174, 145, 183, 154, 192, 163, 219, 172, 228, 181, 237, 190
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Jun 19 2019

Keywords

Comments

This sequence is not a permutation of the integers > 0 as integers with digitsum 11, or 22, or 33, for instance, will not show.

Examples

			The sequence starts with 1,2,3,4,5,6,10,7,11,9,... and we see indeed that the digits of:
{a(1); a(2)} have sum 1 + 2 = 3 (palindrome);
{a(2); a(3)} have sum 2 + 3 = 5 (palindrome);
{a(3); a(4)} have sum 3 + 4 = 7 (palindrome);
{a(4); a(5)} have sum 4 + 5 = 9 (palindrome);
{a(5); a(6)} have sum 5 + 6 = 11 (palindrome);
{a(6); a(7)} have sum 6 + 1 + 0 = 7 (palindrome);
{a(7); a(8)} have sum 1 + 0 + 7 = 8 (palindrome);
{a(8); a(9)} have sum 7 + 1 + 1 = 9 (palindrome);
{a(9); a(10)} have sum 1 + 1 + 9 = 11 (palindrome);
etc.
		

Crossrefs

Cf. A308727 with squares instead of palindromes and A308728 with primes.
Cf. A228407.

Programs

  • Mathematica
    a[1]=1; a[n_]:=a[n]=(k=1;While[MemberQ[Array[a,n-1],k]|| !PalindromeQ@Total[Join[IntegerDigits@a[n-1],IntegerDigits@k]], k++];k)
    Array[a,68] (* Giorgos Kalogeropoulos, Jul 14 2023 *)

A326316 Lexicographically earliest sequence of distinct terms such that the digits of a(n) and a(n+1) sum up to a prime and a(n) + a(n+1) is also a prime.

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 5, 8, 9, 20, 21, 22, 25, 28, 43, 24, 23, 44, 27, 26, 41, 42, 29, 60, 47, 62, 45, 64, 49, 40, 61, 46, 63, 68, 69, 80, 83, 48, 65, 66, 113, 84, 89, 110, 81, 82, 67, 112, 85, 88, 111, 86, 87, 152, 117, 116, 135, 134, 137, 114, 115, 118, 133, 130, 139, 132, 119, 138, 131, 150, 157, 136, 171, 176, 177, 170
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Jun 24 2019

Keywords

Examples

			The sequence starts with 1,2,3,4,7,6,5,8,9,20,21,... and we see indeed that:
the digits of {a(1); a(2)} have sum 1 + 2 = 3 (prime) and a(1) + a(2) is a prime too (3);
the digits of {a(2); a(3)} have sum 2 + 3 = 5 (prime) and a(2) + a(3) is a prime too (5);
the digits of {a(3); a(4)} have sum 3 + 4 = 7 (prime) and a(3) + a(4) is a prime too (7);
the digits of {a(4); a(5)} have sum 4 + 7 = 11 (prime) and a(4) + a(5) is a prime too (11);
the digits of {a(5); a(6)} have sum 7 + 6 = 13 (prime) and a(5) + a(6) is a prime too (13);
...
the digits of {a(9); a(10)} have sum 9 + 2 + 0 = 11 (prime) and a(9) + a(10) = 9 + 20 is a prime too (29);
the digits of {a(10); a(11)} have sum 2 + 0 + 2 + 1 = 5 (prime) and a(10) + a(11) = 20 + 21 is a prime too (41);
etc.
		

Crossrefs

Cf. A326315 (replace the word "prime" by "palindrome"), A326317 (replace the word "prime" by "square"); in A308728 only the sum of the digits is a prime.
Showing 1-2 of 2 results.