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.

A327270 The minimum number such that the concatenation of the absolute values of differences between adjacent digits of a(n) is n. Values of n which have no such a(n) are given as -1.

Original entry on oeis.org

10, 13, 14, 15, 16, 17, 18, 19, 90, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 133, 132, 131, 130, 137, 138, 139, 207, 208, 209, 144, 143, 142, 141, 140, 149, 306, 307, 308, 309, 155, 154, 153, 152, 151, 150, 260, 370, 408, 409, 166, 165, 164, 163, 162, 161, 160, 270
Offset: 1

Views

Author

Scott R. Shannon, Nov 29 2019

Keywords

Comments

This sequence gives the minimum value such that the concatenation of the absolute value of the differences between its adjacent digits give n. Some values of n have no ancestor, see A271639. These are given the value -1 in this sequence.

Examples

			a(1) = 10 as |1 - 0| = 1, and 10 is the smallest such number.
a(9) = 90 as |9 - 0| = 9, and 90 is the smallest such number
a(10) = 100 as |1 - 0| = 1, and |0 - 0| = 0, giving a concatenation of 10. 100 is the smallest such number.
a(48) = 408 as |4 - 0| = 4 and |0 - 8| = 8, giving a concatenation of 48. 408 is the smallest such number.
		

Crossrefs

Programs

  • Mathematica
    max = 60; seq = Table[-1, {max}]; count = 0; n = 1; While[count < max && n <= 10^(1 + Ceiling[Log10[max]]), index = FromDigits @ Abs @ Differences @ IntegerDigits[n]; If[index <= max && seq[[index]] < 0, count++; seq[[index]] = n]; n++]; seq (* Amiram Eldar, Nov 29 2019 *)
  • PARI
    A327270(n)={
      my(v=if(!n, [0], digits(n)));
      my(recurse(k,c) = if(k>#v, c, my(d=v[k],r=-1);
           if(d<=c, r=self()(k+1,c-d));
           if(r<0 && c+d<=9, r=self()(k+1,c+d));
           if(r<0, -1, r+10^(#v+1-k)*c)) );
      my(r=-1, c=1); while(r<0&&c<=9, r=recurse(1,c); c++); r
    } \\ Andrew Howroyd, Dec 10 2024

A086919 Smallest number whose absolute value of the successive digit difference is the n-th palindrome, or -1 if no such number exists.

Original entry on oeis.org

11, 10, 13, 14, 15, 16, 17, 18, 19, 90, 101, 131, 141, 151, 161, 171, 181, 191, 909, 1001, 1010, 1021, 1032, 1043, 1054, 1065, 1076, 1087, 1098, 1331, 1320, 1313, 1302, 1375, 1386, 1397, 2075, 2086, 2097, 1441, 1430, 1425, 1414, 1403, 1496, 3063, 3074, 3085, 3096, 1551
Offset: 1

Views

Author

Amarnath Murthy, Sep 18 2003

Keywords

Comments

Palindromes without solutions are the palindromes in A271639. The first is 737 corresponding to a(83) = -1. - Andrew Howroyd, Dec 10 2024

Examples

			The term corresponding to the palindrome 262 is 1397 and the next term (corresponding to 272) is 2075.
		

Crossrefs

Formula

a(n) = A327270(A002113(n)) for n > 1. - Andrew Howroyd, Dec 10 2024

Extensions

Offset changed and a(37) onwards from Andrew Howroyd, Dec 10 2024

A271641 Quantity of ancestors for n (in the sense explained below).

Original entry on oeis.org

9, 17, 15, 13, 11, 9, 7, 5, 3, 1, 17, 32, 29, 25, 21, 17, 13, 9, 5, 2, 15, 28, 26, 23, 19, 15, 11, 7, 4, 2, 13, 24, 22, 20, 17, 13, 9, 6, 4, 2, 11, 20, 18, 16, 14, 11, 8, 6, 4, 2, 9, 16, 14, 12, 10, 9, 8, 6, 4, 2, 7, 12, 10, 8, 7, 7, 7, 6, 4, 2, 5, 8, 6, 5, 5, 5, 5, 5, 4, 2, 3, 4, 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, 32
Offset: 0

Views

Author

Eric Angelini and Jean-Marc Falcoz, Apr 11 2016

Keywords

Comments

See A271639 for the definition of an ancestor.

Examples

			"0" has 9 ancestors, which are 11, 22, 33, 44, 55, 66, 77, 88 and 99; "1" has 17 ancestors, which are 10, 12, 21, 23, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 98;  "2" has 15 ancestors, which are 13, 20, 24, 31, 35, 42, 46, 53, 57, 64, 68, 75, 79, 86, 97; "3" has 13 ancestors, etc. Thus the sequence starts with 9, 17, 15, 13, etc.
		

Crossrefs

Cf. A271639.
Showing 1-3 of 3 results.