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 45 results. Next

A331556 The lower (or left) offset of a 196-iterate (A006960) from the largest palindrome less than the iterate.

Original entry on oeis.org

5, 9, 14, 99, 52, 89, 100, 407, 268, 10769, 10890, 99, 99, 4400, 8900, 9890, 10000, 97625, 1089, 3584, 99, 629882, 1099890, 10989, 926, 890000, 8491505, 10890099, 8229644, 9999989, 69923062, 10890000, 99099000, 43337905, 99990089, 962943454, 109890, 454649691
Offset: 1

Views

Author

James D. Klein, Jan 20 2020

Keywords

Comments

When normalized over (0,1) by their respective palindrome-free interval about a 196-iterate, it has been empirically observed that the frequency distribution of this sequence appears to be quite symmetric about 0.5, as well as fractal when plotting the distribution over decreasing bin sizes.
The 196-iterates referred to here come from the reverse-and-add process generating A006960.

Examples

			The first term is 5 since 196-191 = 5
The second term is 9 since 887-878 = 9, etc.
		

Crossrefs

Programs

  • Mathematica
    Map[Block[{k = # - 1}, While[k != IntegerReverse@ k, k--]; # - k] &, NestList[# + IntegerReverse[#] &, 196, 25]] (* brute force, or *)
    Map[# - Block[{n = #, w, len, ww}, w = IntegerDigits[n]; len = Length@ w; ww = Take[w, Ceiling[len/2] ]; If[# < n, #, FromDigits@ Flatten@{#, If[OddQ@ len, Reverse@ Most@ #, Reverse@ #]} &@ If[Last@ ww == 0, MapAt[# - 1 &, Most@ ww, -1]~Join~{9}, MapAt[# - 1 &, ww, -1]]] &@ FromDigits@ Flatten@ {ww, If[OddQ@ len, Reverse@ Most@ ww, Reverse@ ww]}] &, NestList[# + IntegerReverse[#] &, 196, 37]] (* Michael De Vlieger, Jan 22 2020 *)
  • Python
    # Slow Brute-force
    n = 196
    while n < 10**15:
      m = n
      while m != int(str(m)[::-1]): m+=-1
      print(n-m, end=', ')
      n = n + int(str(n)[::-1])

Formula

a(n) = A331560(n) - A331557(n).

Extensions

More terms from Michael De Vlieger, Jan 22 2020

A331557 The upper (or right) offset of a 196-iterate (A006960) from the smallest palindrome greater than the iterate.

Original entry on oeis.org

6, 1, 96, 11, 48, 11, 10, 693, 732, 231, 110, 10901, 10901, 5600, 1100, 110, 1000, 12375, 108911, 96416, 99901, 470118, 110, 1089011, 999074, 110000, 2508495, 109901, 1770356, 11, 40076938, 99110000, 10901000, 56662095, 9911, 137056546, 1099890110, 545350309
Offset: 1

Views

Author

James D. Klein, Jan 20 2020

Keywords

Comments

When normalized over (0,1) by their respective palindrome-free interval about a 196-iterate, it has been empirically observed that the frequency distribution of this sequence appears to be quite symmetric about 0.5, as well as fractal when plotting the distribution over decreasing bin sizes.
The 196-iterates referred to here come from the reverse-and-add process generating A006960.

Examples

			The first term is 6 since 202-196 = 6;
The second term is 1 since 888-887 = 1; etc.
		

Crossrefs

Programs

  • Python
    # Upper 196 offsets. Slow brute force
    n = 196
    while n < 10**15:
      m = n
      while m != int(str(m)[::-1]): m+=1
      print(m-n)
      n = n + int(str(n)[::-1])

Formula

a(n) = A331560(n) - A331556(n).

Extensions

More terms from Jinyuan Wang, Feb 29 2020

A331560 Size of the palindrome-free intervals about the 196-iterates, A006960.

Original entry on oeis.org

11, 10, 110, 110, 100, 100, 110, 1100, 1000, 11000, 11000, 11000, 11000, 10000, 10000, 10000, 11000, 110000, 110000, 100000, 100000, 1100000, 1100000, 1100000, 1000000, 1000000, 11000000, 11000000, 10000000, 10000000, 110000000, 110000000, 110000000, 100000000
Offset: 1

Views

Author

James D. Klein, Jan 20 2020

Keywords

Comments

By empirical observation, the integers in this sequence are of the form 10*10^n and 11*10^n, n >= 0, since they are the difference of consecutive palindromes surrounding the 196-iterates. (No differences of 2 observed.)

Examples

			191 < 196 < 202, 202 - 191 = 11;
878 < 887 < 888, 888 - 878 = 10; etc.
		

Crossrefs

Programs

  • Python
    # Palindrome-free interval about 196 offsets. Slow brute-force
    n = 196
    while n < 10**15:
         m = n
         while m != int(str(m)[::-1]): m+=1
         s = m
         m = n
         while m != int(str(m)[::-1]): m-=1
         print(s-m)
         n = n + int(str(n)[::-1])

Formula

a(n) = A331556(n) + A331557(n).

Extensions

a(31)-a(34) from Jinyuan Wang, Feb 29 2020

A217774 Palindromic deviation of terms of A006960.

Original entry on oeis.org

5, 1, 5, 2, 7, 2, 1, 14, 16, 11, 2, 2, 2, 8, 2, 2, 1, 14, 4, 14, 2, 28, 11, 20, 15, 2, 21, 13, 19, 2, 17, 11, 11, 27, 4, 32, 4, 37, 12, 12, 33, 2, 13, 28, 5, 49, 17, 47, 13, 43, 6, 39, 17, 44, 6, 45, 2, 35, 8, 37, 6, 69, 15, 47, 18, 48, 10, 33, 2, 59, 15, 19, 26, 17, 17, 73, 15, 55, 15, 63, 15, 43, 17, 12, 67, 10
Offset: 0

Views

Author

W. W. Kokko, Mar 24 2013

Keywords

Comments

Apply the map n -> PD(n) = A064834(n) to the terms of A006960.
If 196 ever reaches a palindrome (which is an open problem), a(n) will become 0.

A323797 a(n)..a(n+1)-1 are the indices in A323796 pointing to A006960(n) in the Reverse and Add! graph with 196 seed.

Original entry on oeis.org

1, 9, 13, 55, 103, 143, 183, 191, 431, 745, 1393
Offset: 1

Views

Author

A.H.M. Smeets, Jan 28 2019

Keywords

Comments

This is a supporting sequence for A323796.

Crossrefs

A011375 Length of n-th term in A006960.

Original entry on oeis.org

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

Views

Author

Keywords

A056964 a(n) = n + reversal of digits of n.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 66, 77, 88, 99, 110
Offset: 0

Views

Author

Henry Bottomley, Jul 18 2000

Keywords

Comments

If n has an even number of digits then a(n) is a multiple of 11.
Also called the Reverse and Add!, or RADD operation. Iteration of this function leads to the definition of Lychrel and related numbers, cf. A023108, A063048, A088753, A006960, and many others. - M. F. Hasler, Apr 13 2019

Examples

			a(17) = 17 + 71 = 88.
		

Crossrefs

Differs from A052008 when n=101 and a(101)=202 while A052008(101)=121
Cf. A036839.

Programs

Formula

a(n) = n + A004086(n) = 2*n - A056965(n).
n < a(n) < 11n for n > 0. - Charles R Greathouse IV, Nov 17 2022

A023108 Positive integers which apparently never result in a palindrome under repeated applications of the function A056964(x) = x + (x with digits reversed).

Original entry on oeis.org

196, 295, 394, 493, 592, 689, 691, 788, 790, 879, 887, 978, 986, 1495, 1497, 1585, 1587, 1675, 1677, 1765, 1767, 1855, 1857, 1945, 1947, 1997, 2494, 2496, 2584, 2586, 2674, 2676, 2764, 2766, 2854, 2856, 2944, 2946, 2996, 3493, 3495, 3583, 3585, 3673, 3675
Offset: 1

Views

Author

Keywords

Comments

196 is conjectured to be smallest initial term which does not lead to a palindrome. John Walker, Tim Irvin and others have extended this to millions of digits without finding one (see A006960).
Also called Lychrel numbers, though the definition of "Lychrel number" varies: Purists only call the "seeds" or "root numbers" Lychrel; the "related" or "extra" numbers (arising in the former's orbit) have been coined "Kin numbers" by Koji Yamashita. There are only 2 "root" Lychrels below 1000 and 3 more below 10000, cf. A088753. - M. F. Hasler, Dec 04 2007
Question: when do numbers in this sequence start to outnumber numbers that are not in the sequence? - J. Lowell, May 15 2014
Answer: according to Doucette's site, 10-digit numbers have 49.61% of Lychrels. So beyond 10 digits, Lychrels start to outnumber non-Lychrels. - Dmitry Kamenetsky, Oct 12 2015
From the current definition it is unclear whether palindromes are excluded from this sequence, cf. A088753 vs A063048. 9999 would be the first palindromic term that will never result in a palindrome when the Reverse-then-add function A056964 is repeatedly applied. - M. F. Hasler, Apr 13 2019

Examples

			From _M. F. Hasler_, Feb 16 2020: (Start)
Under the "add reverse" operation, we have:
196 (+ 691) -> 887 (+ 788) -> 1675 (+ 5761) -> 7436 (+ 6347) -> 13783 (+ 38731) -> etc. which apparently never leads to a palindrome.
Similar for 295 (+ 592) -> 887, 394 (+ 493) -> 887, 790 (+ 097) -> 887 and 689 (+ 986) -> 1675, which all merge immediately into the above sequence, and also for the reverse of any of the numbers occurring in these sequences: 493, 592, 691, 788, ...
879 (+ 978) -> 1857 -> 9438 -> 17787 -> 96558 is the only other "root" Lychrel below 1000 which yields a sequence distinct from that of 196. (End)
		

References

  • Daniel Lignon, Dictionnaire de (presque) tous les nombres entiers, Ellipses, Paris, 2012, 702 pages. See Entry 196.

Crossrefs

Cf. A056964 ("reverse and add" operation on which this is based).

Programs

  • Mathematica
    With[{lim = 10^3}, Select[Range@ 4000, Length@ NestWhileList[# + IntegerReverse@ # &, #, ! PalindromeQ@ # &, 1, lim] == lim + 1 &]] (* Michael De Vlieger, Dec 23 2017 *)
  • PARI
    select( {is_A023108(n, L=exponent(n+1)*5)=while(L--&& n*2!=n+=A004086(n),);!L}, [1..3999]) \\ with {A004086(n)=fromdigits(Vecrev(digits(n)))}; default value for search limit L chosen according to known records A065199 and indices A065198. - M. F. Hasler, Apr 13 2019, edited Feb 16 2020

Extensions

Edited by M. F. Hasler, Dec 04 2007

A033865 Start with n; if palindrome, stop; otherwise add to itself with digits reversed; a(n) gives palindrome at which it stops, or -1 if no palindrome is ever reached.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 33, 44, 55, 66, 77, 88, 99, 121, 22, 33, 22, 55, 66, 77, 88, 99, 121, 121, 33, 44, 55, 33, 77, 88, 99, 121, 121, 363, 44, 55, 66, 77, 44, 99, 121, 121, 363, 484, 55, 66, 77, 88, 99, 55, 121, 363, 484, 1111, 66, 77, 88, 99, 121, 121, 66, 484, 1111, 4884, 77, 88, 99, 121, 121, 363, 484, 77, 4884, 44044, 88
Offset: 0

Views

Author

Keywords

Comments

It is believed that a(196) = -1.

Examples

			19 -> 19 + 91 = 110 -> 110 + 011 = 121, so a(19) = 121.
		

References

  • M. Donner, I Love Me, Vol. I: S. Wordrow's palindromic encyclopedia (Algonquin Books, 1996) p. 268

Crossrefs

Cf. A061563, A016016, A023109, A006960, A023108, A002113, A033665 (number of steps).

Programs

  • ARIBAS
    var st: stack; end; for k := 0 to 60 do n := k; while n <> int_reverse(n) do n := n + int_reverse(n); end; stack_push(st,n); end; stack2array(st);
    
  • Mathematica
    Table[NestWhile[# + FromDigits[Reverse[IntegerDigits[#]]] &, n, IntegerDigits[#] != Reverse[IntegerDigits[#]] &], {n, 0, 90}] (* Harvey P. Dale, Dec 18 2011 *)
  • PARI
    a(n)=my(k); while((k=fromdigits(Vecrev(digits(n)))) != n, n += k); n \\ infinite loop if a(n) = -1; Charles R Greathouse IV, Dec 13 2015

Extensions

More terms from Jenise Smalley (neicey01(AT)hotmail.com), Oct 18 2001

A023109 a(0) = 0. For n > 0, smallest non-palindromic number k such that the smallest palindrome in the Reverse and Add! trajectory of k is reached after exactly n iterations.

Original entry on oeis.org

0, 10, 19, 59, 69, 166, 79, 188, 193, 1397, 829, 167, 2069, 1797, 849, 177, 1496, 739, 1798, 10777, 6999, 1297, 869, 187, 89, 10797, 10853, 10921, 10971, 13297, 10548, 13293, 17793, 20889, 700269, 106977, 108933, 80359, 13697, 10794, 15891, 1009227, 1007619, 1009246, 1008628, 600259, 131996, 70759, 1007377, 1001699, 600279, 141996, 70269, 10677, 10833, 10911
Offset: 0

Views

Author

Keywords

Comments

From Felix Fröhlich, May 28 2022: (Start)
Variant of A015994 not allowing palindromes as starting values.
Smallest non-palindromic k such that A033665(k) = n. (End)

Crossrefs

Programs

  • Mathematica
    Table[ SelectFirst[Range[0, 20000], (np = #; i = 0;
        While[ ! PalindromeQ[np] && i <= n, np = np + IntegerReverse[np];
         i++]; i == n ) &] , {n, 0, 32}] (* Robert Price, Oct 16 2019 *)
  • PARI
    rev(n)={d=digits(n);p="";for(i=1,#d,p=concat(Str(d[i]),p));return(eval(p))}
    nbs(n)=if(n==rev(n),return(0));for(k=1,10^3,i=n+rev(n);if(rev(i)==i,return(k));n=i) \\ A033665
    a(n)=for(k=1,10^8,if(nbs(k)==n,return(k)))
    n=0;while(n<100,print1(a(n),", ");n++) \\ Derek Orr, Jul 28 2014
    
  • PARI
    revadd(n) = n+eval(concat(Vecrev(Str(n))))
    iterationstosmallestpalindrome(n, bound) = my(x=n, i=0, d); while(1, if(i > bound, return(-1)); x=revadd(x); i++; d=digits(x); if(d==Vecrev(d), return(i)))
    a(n) = if(n==0, return(0)); for(k=1, oo, my(d=digits(k)); if(d!=Vecrev(d), if(iterationstosmallestpalindrome(k, n)==n, return(k)))) \\ Felix Fröhlich, May 28 2022
  • Python
    def A023109(n):
        if n > 0:
            k = 0
            while True:
                m = k
                for i in range(n):
                    if str(m) == str(m)[::-1]:
                        break
                    m += int(str(m)[::-1])
                else:
                    if str(m) == str(m)[::-1]:
                        return k
                k += 1
        else:
            return 0
    # Chai Wah Wu, Feb 08 2015
    

Extensions

a(41)-a(55) verified and added by Aldo González Lorenzo, May 15 2011
Name edited by Felix Fröhlich, May 28 2022
Showing 1-10 of 45 results. Next