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

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

A343706 Lesser emirps (A109308) p such that A056964(p) is in A343703.

Original entry on oeis.org

17, 107, 113, 167, 179, 389, 1031, 1091, 1097, 1109, 1181, 1259, 1439, 1487, 1523, 1583, 1619, 1847, 3023, 3089, 3257, 3347, 3359, 3527, 3719, 7349, 7529, 7577, 7589, 7649, 7949, 9029, 10067, 10151, 10247, 10487, 10739, 10781, 11057, 11423, 11621, 11777, 11897, 11933, 12119, 12227, 12641, 13151
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Apr 26 2021

Keywords

Comments

Primes p such that the digit-reversal q = A004086(p) is a prime greater than p, and p+q = x*y for some x and y such that x+y and the concatenation x|y are primes.

Examples

			a(4) = 167 is a term because 167 and 761 are primes with 167 < 761, and 167+761 = 928 = 32*29 with 3229 and 32+29 = 61 prime.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local L,i;
        L:= convert(n,base,10);
        add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    filter:= proc(p) local q,m,d,e;
       q:= revdigs(p); if q <= p then return false fi;
       if not isprime(p) or not isprime(q) then return false fi;
       m:= p+q;
       for d in numtheory:-divisors(m) do
         e:= m/d;
         if isprime(d*10^(1+ilog10(e))+e) and isprime(d+e) then return true fi
       od;
       false
    end proc:

A358984 The number of n-digit numbers k such that k + digit reversal of k (A056964) is a square.

Original entry on oeis.org

3, 8, 19, 0, 169, 896, 1496, 3334, 21789, 79403, 239439, 651236, 1670022, 3015650, 27292097, 55608749, 234846164, 366081231, 2594727780, 6395506991
Offset: 1

Views

Author

Nicolay Avilov, Dec 08 2022

Keywords

Comments

Number of terms of A061230 which are n digits long.

Examples

			a(1) = 3 because there are 3 single-digit numbers: 0, 2, 8 such that b + b = m^2, for example, 8 + 8 = 16 = 4^2;
a(2) = 8 because there are 8 two-digit numbers: 29, 38, 47, 56, 65, 74, 83, 92 such that bc + cb = m^2, for example, 29 + 92 = 121 = 11^2.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Length[Select[Table[k, {k, 10^(n-1),10^n-1}],IntegerQ[Sqrt[#+FromDigits[Reverse[IntegerDigits[#]]]]]&]]; Array[a,10] (* Stefano Spezia, Dec 09 2022 *)
  • Python
    from math import isqrt
    def s(n): return isqrt(n)**2 == n
    def c(n): return s(n + int(str(n)[::-1]))
    def a(n): return 3 if n == 1 else sum(1 for k in range(10**(n-1), 10**n) if c(k))
    print([a(n) for n in range(1, 7)]) # Michael S. Branicky, Dec 08 2022

Extensions

a(9)-a(10) from Michael S. Branicky, Dec 08 2022
a(11)-a(20) from Talmon Silver, Dec 25 2022

A002113 Palindromes in base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 404, 414, 424, 434, 444, 454, 464, 474, 484, 494, 505, 515
Offset: 1

Views

Author

Keywords

Comments

n is a palindrome (i.e., a(k) = n for some k) if and only if n = A004086(n). - Reinhard Zumkeller, Mar 10 2002
It seems that if n*reversal(n) is in the sequence then n = 3 or all digits of n are less than 3. - Farideh Firoozbakht, Nov 02 2014
The position of a palindrome within the sequence can be determined almost without calculation: If the palindrome has an even number of digits, prepend a 1 to the front half of the palindrome's digits. If the number of digits is odd, prepend the value of front digit + 1 to the digits from position 2 ... central digit. Examples: 98766789 = a(19876), 515 = a(61), 8206028 = a(9206), 9230329 = a(10230). - Hugo Pfoertner, Aug 14 2015
This sequence is an additive basis of order at most 49, see Banks link. - Charles R Greathouse IV, Aug 23 2015
The order has been reduced from 49 to 3; see the Cilleruelo-Luca and Cilleruelo-Luca-Baxter links. - Jonathan Sondow, Nov 27 2017
See A262038 for the "next palindrome" and A261423 for the "preceding palindrome" functions. - M. F. Hasler, Sep 09 2015
The number of palindromes with d digits is 10 if d = 1, and otherwise it is 9 * 10^(floor((d - 1)/2)). - N. J. A. Sloane, Dec 06 2015
Sequence A033665 tells how many iterations of the Reverse-then-add function A056964 are needed to reach a palindrome; numbers for which this will never happen are Lychrel numbers (A088753) or rather Kin numbers (A023108). - M. F. Hasler, Apr 13 2019
This sequence is an additive basis of order 3, see Cilleruelo, Luca, & Baxter and Sigg. - Charles R Greathouse IV, Apr 08 2025

References

  • Karl G. Kröber, "Palindrome, Perioden und Chaoten: 66 Streifzüge durch die palindromischen Gefilde" (1997, Deutsch-Taschenbücher; Bd. 99) ISBN 3-8171-1522-9.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 71.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, pages 50-52.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 120.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A061917 and A221221.
A110745 is a subsequence.
Union of A056524 and A056525.
Palindromes in bases 2 through 11: A006995 and A057148, A014190 and A118594, A014192 and A118595, A029952 and A118596, A029953 and A118597, A029954 and A118598, A029803 and A118599, A029955 and A118600, this sequence, A029956. Also A262065 (base 60), A262069 (subsequence).
Palindromic primes: A002385. Palindromic nonprimes: A032350.
Palindromic-pi: A136687.
Cf. A029742 (complement), A086862 (first differences).
Palindromic floor function: A261423, also A261424. Palindromic ceiling: A262038.
Cf. A004086 (read n backwards), A064834, A118031, A136522 (characteristic function), A178788.
Ways to write n as a sum of three palindromes: A261132, A261422.
Minimal number of palindromes that add to n using greedy algorithm: A088601.
Minimal number of palindromes that add to n: A261675.

Programs

  • GAP
    Filtered([0..550],n->ListOfDigits(n)=Reversed(ListOfDigits(n))); # Muniru A Asiru, Mar 08 2019
    
  • Haskell
    a002113 n = a002113_list !! (n-1)
      a002113_list = filter ((== 1) . a136522) [1..] -- Reinhard Zumkeller, Oct 09 2011
    
  • Haskell
    import Data.List.Ordered (union)
      a002113_list = union a056524_list a056525_list -- Reinhard Zumkeller, Jul 29 2015, Dec 28 2011
    
  • Magma
    [n: n in [0..600] | Intseq(n, 10) eq Reverse(Intseq(n, 10))]; // Vincenzo Librandi, Nov 03 2014
    
  • Maple
    read transforms; t0:=[]; for n from 0 to 2000 do if digrev(n) = n then t0:=[op(t0),n]; fi; od: t0;
    # Alternatively, to get all palindromes with <= N digits in the list "Res":
    N:=5;
    Res:= $0..9:
    for d from 2 to N do
      if d::even then
        m:= d/2;
        Res:= Res, seq(n*10^m + digrev(n),n=10^(m-1)..10^m-1);
      else
        m:= (d-1)/2;
        Res:= Res, seq(seq(n*10^(m+1)+y*10^m+digrev(n),y=0..9),n=10^(m-1)..10^m-1);
      fi
    od: Res:=[Res]: # Robert Israel, Aug 10 2014
    # A variant: Gets all base-10 palindromes with exactly d digits, in the list "Res"
    d:=4:
    if d=1 then Res:= [$0..9]:
    elif d::even then
        m:= d/2:
        Res:= [seq(n*10^m + digrev(n), n=10^(m-1)..10^m-1)]:
    else
        m:= (d-1)/2:
        Res:= [seq(seq(n*10^(m+1)+y*10^m+digrev(n), y=0..9), n=10^(m-1)..10^m-1)]:
    fi:
    Res; # N. J. A. Sloane, Oct 18 2015
    isA002113 := proc(n)
        simplify(digrev(n) = n) ;
    end proc: # R. J. Mathar, Sep 09 2015
  • Mathematica
    palQ[n_Integer, base_Integer] := Module[{idn = IntegerDigits[n, base]}, idn == Reverse[idn]]; (* then to generate any base-b sequence for 1 < b < 37, replace the 10 in the following instruction with b: *) Select[Range[0, 1000], palQ[#, 10] &]
    base10Pals = {0}; r = 2; Do[Do[AppendTo[base10Pals, n * 10^(IntegerLength[n] - 1) + FromDigits@Rest@Reverse@IntegerDigits[n]], {n, 10^(e - 1), 10^e - 1}]; Do[AppendTo[base10Pals, n * 10^IntegerLength[n] + FromDigits@Reverse@IntegerDigits[n]], {n, 10^(e - 1), 10^e - 1}], {e, r}]; base10Pals (* Arkadiusz Wesolowski, May 04 2012 *)
    nthPalindromeBase[n_, b_] := Block[{q = n + 1 - b^Floor[Log[b, n + 1 - b^Floor[Log[b, n/b]]]], c = Sum[Floor[Floor[n/((b + 1) b^(k - 1) - 1)]/(Floor[n/((b + 1) b^(k - 1) - 1)] - 1/b)] - Floor[Floor[n/(2 b^k - 1)]/(Floor[n/(2 b^k - 1)] - 1/ b)], {k, Floor[Log[b, n]]}]}, Mod[q, b] (b + 1)^c * b^Floor[Log[b, q]] + Sum[Floor[Mod[q, b^(k + 1)]/b^k] b^(Floor[Log[b, q]] - k) (b^(2 k + c) + 1), {k, Floor[Log[b, q]]}]] (* after the work of Eric A. Schmidt, works for all integer bases b > 2 *)
    Array[nthPalindromeBase[#, 10] &, 61, 0] (* please note that Schmidt uses a different, a more natural and intuitive offset, that of a(1) = 1. - Robert G. Wilson v, Sep 22 2014 and modified Nov 28 2014 *)
    Select[Range[10^3], PalindromeQ] (* Michael De Vlieger, Nov 27 2017 *)
    nLP[cn_Integer]:=Module[{s,len,half,left,pal,fdpal},s=IntegerDigits[cn]; len=Length[s]; half=Ceiling[len/2]; left=Take[s,half]; pal=Join[left,Reverse[ Take[left,Floor[len/2]]]]; fdpal=FromDigits[pal]; Which[cn==9,11,fdpal>cn,fdpal,True,left=IntegerDigits[ FromDigits[left]+1]; pal=Join[left,Reverse[Take[left,Floor[len/2]]]]; FromDigits[pal]]]; NestList[nLP,0,100] (* Harvey P. Dale, Dec 10 2024 *)
  • PARI
    is_A002113(n)=Vecrev(n=digits(n))==n \\ M. F. Hasler, Nov 17 2008, updated Apr 26 2014, Jun 19 2018
    
  • PARI
    is(n)=n=digits(n);for(i=1,#n\2,if(n[i]!=n[#n+1-i],return(0))); 1 \\ Charles R Greathouse IV, Jan 04 2013
    
  • PARI
    a(n)={my(d,i,r);r=vector(#digits(n-10^(#digits(n\11)))+#digits(n\11));n=n-10^(#digits(n\11));d=digits(n);for(i=1,#d,r[i]=d[i];r[#r+1-i]=d[i]);sum(i=1,#r,10^(#r-i)*r[i])} \\ David A. Corneth, Jun 06 2014
    
  • PARI
    \\ recursive--feed an element a(n) and it gives a(n+1)
    nxt(n)=my(d=digits(n));i=(#d+1)\2;while(i&&d[i]==9,d[i]=0;d[#d+1-i]=0;i--);if(i,d[i]++;d[#d+1-i]=d[i],d=vector(#d+1);d[1]=d[#d]=1);sum(i=1,#d,10^(#d-i)*d[i]) \\ David A. Corneth, Jun 06 2014
    
  • PARI
    \\ feed a(n), returns n.
    inv(n)={my(d=digits(n));q=ceil(#d/2);sum(i=1,q,10^(q-i)*d[i])+10^floor(#d/2)} \\ David A. Corneth, Jun 18 2014
    
  • PARI
    inv_A002113(P)={P\(P=10^(logint(P+!P,10)\/2))+P} \\ index n of palindrome P = a(n), much faster than above: no sum is needed. - M. F. Hasler, Sep 09 2018
    
  • PARI
    A002113(n,L=logint(n,10))=(n-=L=10^max(L-(n<11*10^(L-1)),0))*L+fromdigits(Vecrev(digits(if(nM. F. Hasler, Sep 11 2018
    
  • Python
    # edited by M. F. Hasler, Jun 19 2018
    def A002113_list(nMax):
      mlist=[]
      for n in range(nMax+1):
         mstr=str(n)
         if mstr==mstr[::-1]:
            mlist.append(n)
      return mlist # Bill McEachen, Dec 17 2010
    
  • Python
    from itertools import chain
    A002113 = sorted(chain(map(lambda x:int(str(x)+str(x)[::-1]),range(1,10**3)),map(lambda x:int(str(x)+str(x)[-2::-1]), range(10**3)))) # Chai Wah Wu, Aug 09 2014
    
  • Python
    from itertools import chain, count
    A002113 = chain(k for k in count(0) if str(k) == str(k)[::-1])
    print([next(A002113) for k in range(60)]) # Jan P. Hartkopf, Apr 10 2021
    
  • Python
    is_A002113 = lambda n: (s:=str(n))[::-1]==s # M. F. Hasler, May 23 2024
    
  • Python
    from math import log10, floor
    def A002113(n):
      if n < 2: return 0
      P = 10**floor(log10(n//2)); M = 11*P
      s = str(n - (P if n < M else M-P))
      return int(s + s[-2 if n < M else -1::-1]) # M. F. Hasler, Jun 06 2024
    
  • SageMath
    [n for n in (0..515) if Word(n.digits()).is_palindrome()] # Peter Luschny, Sep 13 2018
    
  • Scala
    def palQ(n: Int, b: Int = 10): Boolean = n - Integer.parseInt(n.toString.reverse) == 0
    (0 to 999).filter(palQ()) // _Alonso del Arte, Nov 10 2019

Formula

A136522(a(n)) = 1.
A178788(a(n)) = 0 for n > 9. - Reinhard Zumkeller, Jun 30 2010
A064834(a(n)) = 0. - Reinhard Zumkeller, Sep 18 2013
a(n+1) = A262038(a(n)+1). - M. F. Hasler, Sep 09 2015
Sum_{n>=2} 1/a(n) = A118031. - Amiram Eldar, Oct 17 2020
a(n) = (floor(d(n)/(c(n)*9 + 1)))*10^A055642(d(n)) + A004086(d(n)) where b(n, k) = ceiling(log((n + 1)/k)/log(10)), c(n) = b(n, 2) - b(n, 11) and d(n) = (n - A086573(b(n*(2 - c(n)), 2) - 1)/2 - 1). - Alan Michael Gómez Calderón, Mar 11 2025

A067030 Numbers of the form k + reverse(k) for at least one k.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 11, 12, 14, 16, 18, 22, 33, 44, 55, 66, 77, 88, 99, 101, 110, 121, 132, 141, 143, 154, 161, 165, 176, 181, 187, 198, 201, 202, 221, 222, 241, 242, 261, 262, 281, 282, 302, 303, 322, 323, 342, 343, 362, 363, 382, 383, 403, 404, 423, 424, 443
Offset: 0

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Comments

From Avik Roy (avik_3.1416(AT)yahoo.co.in), Feb 02 2009: (Start)
Any (k+1)-digit number m can be represented as
m = Sum_{i=0..k} (ai*10^i).
Reverse(m) = Sum_{i=0..k} (ai*10^(k-i)).
m+Reverse(m) = Sum_{i=0..k} (ai*(10^i+10^(k-i))).
The last formula can produce all the terms of this sequence; the order of terms is explicitly determined by the order of ai's (repetition of terms might not be avoided). (End)

Examples

			0 belongs to the sequence since 0 + 0 = 0;
33 belongs to the sequence since 12 + 21 = 33.
		

Crossrefs

Programs

  • ARIBAS
    function Reverse(n: integer): integer; var i: integer; str, rev: string;
    begin str := itoa(n); rev := "";
    for i := 0 to length(str)-1 do rev := concat(str[i], rev); end;
    return atoi(rev); end Reverse;
    function A067030(a, b: integer); var k, n: integer;
    begin for n := a to b do k := 0; while k <= n do
    if n = k+Reverse(k) then write(n, ", "); break; else inc(k); end;
    end; end; end A067030;
    A067030(0, 500) (* revised by Klaus Brockhaus, May 04 2011 *).
    
  • Magma
    A067030:=function(a, b); S:=[]; for n in [a..b] do k:=0; while k le n do if n eq k+Seqint(Reverse(Intseq(k))) then Append(~S, n); break; else k+:=1; end if; end while; end for; return S; end function; A067030(0, 500); // Klaus Brockhaus, May 04 2011
    
  • Mathematica
    M = 10^3; digrev[n_] := IntegerDigits[n] // Reverse // FromDigits; Clear[b]; b[A067030%20=%20Join%5B%7B0%7D,%20Reap%5BFor%5Bn%20=%201,%20n%20%3C=%20M,%20n++,%20If%5Bb%5Bn%5D%20%3E=%201,%20Sow%5Bn%5D%5D%5D%5D%5B%5B2,%201%5D%5D%5D%20(*%20_Jean-Fran%C3%A7ois%20Alcover">] = 0; For[n = 1, n <= M, n++, t1 = n + digrev[n]; If[t1 <= M, b[t1] = b[t1] + 1]]; A067030 = Join[{0}, Reap[For[n = 1, n <= M, n++, If[b[n] >= 1, Sow[n]]]][[2, 1]]] (* _Jean-François Alcover, Oct 01 2016, after N. J. A. Sloane's Maple code in A072040 *)
    max = 1000; l = ConstantArray[0, max]; Do[s = n + IntegerReverse@n; If[s <= max, l[[s]]++], {n, max}]; Flatten@{0, Position[l, ?(# != 0 &)]} (* _Hans Rudolf Widmer, Dec 25 2022 *)
  • Python
    def aupto(lim): return sorted(set(t for t in (k + int(str(k)[::-1]) for k in range(lim+1)) if t <= lim))
    print(aupto(443)) # Michael S. Branicky, Dec 25 2022

A006960 Reverse and Add! sequence starting with 196.

Original entry on oeis.org

196, 887, 1675, 7436, 13783, 52514, 94039, 187088, 1067869, 10755470, 18211171, 35322452, 60744805, 111589511, 227574622, 454050344, 897100798, 1794102596, 8746117567, 16403234045, 70446464506, 130992928913, 450822227944, 900544455998, 1800098901007, 8801197801088, 17602285712176
Offset: 0

Views

Author

Keywords

Comments

196 is conjectured to be the smallest initial term which does not lead to a palindrome. John Walker, Tim Irvin and others have extended the trajectory of 196 to millions of digits without finding a palindrome.
From A.H.M. Smeets, Jan 31 2019: (Start)
Palindromes for a(9)/2, a(14)/2 and a(20)/2.
Observed: It seems that most, but not all, Lychrel numbers (seeds given in A063048) have a trajectory term that, divided by 2, becomes palindromic. Note that 196 is the first Lychrel number (A063048(1)). (End)
Observed: On average, 0.414 digits are gained by each step of the reverse and add procedure; i.e., 2.416 steps are needed on average to gain a factor of 10. This holds for any trajectory of reverse and add for decimal number representation. - A.H.M. Smeets, Feb 03 2019

Examples

			From _M. F. Hasler_, Apr 13 2019: (Start)
Start with 196 = a(0), then:
A056964(196) = 196 + 691 = 887 = a(1); then:
A056964(887) = 887 + 788 = 1675 = a(2); then:
A056964(1675) = 1675 + 5761 = 7436 = a(3); then:
A056964(7436) = 7436 + 6347 = 13783 = a(4); then:
A056964(13783) = 13783 + 38731 = 52514 = a(5); etc. (End)
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 196, p. 58, Ellipses, Paris 2008.
  • D. H. Lehmer, "Sujets d'étude. No. 74," Sphinx (Bruxelles), 8 (1938), 12-13. (This is the currently earliest known reference to the 196 Problem). - James D. Klein, Apr 09 2012
  • Daniel Lignon, Dictionnaire de (presque) tous les nombres entiers, Ellipses, Paris, 2012, 702 pages. See Entry 196.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 70.
  • Popular Computing (Calabasas, CA), The 196 Problem, Vol. 3 (No. 30, Sep 1975), pages PC30-6 to PC30-9.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006960 n = a006960_list !! n
    a006960_list = iterate a056964 196 -- Reinhard Zumkeller, Sep 22 2011
    
  • Maple
    a:= proc(n) option remember; `if`(n=0, 196, (h-> h+ (s->
          parse(cat(s[-i]$i=1..length(s))))(""||h))(a(n-1)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 25 2014
  • Mathematica
    a = {196}; For[i = 2, i < 26, i++, a = Append[a, a[[i - 1]] + ToExpression[ StringReverse[ToString[a[[i - 1]]]]]]]; a
    NestList[#+FromDigits[Reverse[IntegerDigits[#]]]&,196,25] (* Harvey P. Dale, Jun 05 2011 *)
    NestList[#+IntegerReverse[#]&,196,25] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 04 2019 *)
  • PARI
    A006960_vec(N=99)=vector(N,i,N=if(i>1,A056964(N),196)) \\ M. F. Hasler, Apr 13 2019

Formula

a(n+1) = A056964(a(n)). - A.H.M. Smeets, Jan 27 2019

Extensions

More terms from Vit Planocka (planocka(AT)mistral.cz), Sep 28 2002

A056965 a(n) = n - (reversal of digits of n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, -9, -18, -27, -36, -45, -54, -63, -72, 18, 9, 0, -9, -18, -27, -36, -45, -54, -63, 27, 18, 9, 0, -9, -18, -27, -36, -45, -54, 36, 27, 18, 9, 0, -9, -18, -27, -36, -45, 45, 36, 27, 18, 9, 0, -9, -18, -27, -36, 54, 45, 36, 27, 18, 9, 0, -9, -18, -27, 63, 54, 45, 36, 27, 18, 9, 0, -9, -18, 72, 63, 54
Offset: 0

Views

Author

Henry Bottomley, Jul 18 2000

Keywords

Comments

a(n) is a multiple of 9.

Examples

			a(17) = 17 - 71 = -54.
		

Crossrefs

Programs

  • Haskell
    a056965 n = n - a004086 n  -- Reinhard Zumkeller, Sep 17 2013
    
  • Maple
    a:= n-> (s-> n-parse(cat(s[-i]$i=1..length(s))))(""||n):
    seq(a(n), n=0..82);  # Alois P. Heinz, Jul 11 2021
  • Mathematica
    Table[n - FromDigits[Reverse[IntegerDigits[n]]], {n, 0, 82}] (* Jayanta Basu, Jul 11 2013 *)
  • PARI
    a(n) = n - fromdigits(Vecrev(digits(n))); \\ Michel Marcus, Dec 20 2023
  • Python
    def a(n): return n - int(str(n)[::-1]) # Osman Mustafa Quddusi, Jul 11 2021
    

Formula

a(n) = n - A004086(n) = 2*n - A056964(n).

A036839 RATS(n): Reverse Add Then Sort the digits.

Original entry on oeis.org

0, 2, 4, 6, 8, 1, 12, 14, 16, 18, 11, 22, 33, 44, 55, 66, 77, 88, 99, 11, 22, 33, 44, 55, 66, 77, 88, 99, 11, 112, 33, 44, 55, 66, 77, 88, 99, 11, 112, 123, 44, 55, 66, 77, 88, 99, 11, 112, 123, 134, 55, 66, 77, 88, 99, 11, 112, 123, 134, 145, 66, 77
Offset: 0

Views

Author

N. J. A. Sloane, Jan 19 2002

Keywords

Comments

a(n) = RATS(n), not RATS(a(n-1)).
Row 10 of A288535. - Andrey Zabolotskiy, Jun 14 2017

Examples

			1 -> 1 + 1 = 2, so a(1) = 2; 3 -> 3 + 3 = 6, so a(3) = 6.
		

Crossrefs

Programs

  • Haskell
    a036839 = a004185 . a056964  -- Reinhard Zumkeller, Mar 14 2012
    
  • Maple
    read transforms; RATS := n -> digsort(n + digrev(n));
  • Mathematica
    FromDigits[Sort[IntegerDigits[#+FromDigits[Reverse [IntegerDigits[#]]]]]] & /@Range[0,80]  (* Harvey P. Dale, Mar 26 2011 *)
  • Python
    def A036839(n):
        x = str(n+int(str(n)[::-1]))
        return int("".join(sorted(x))) # Indranil Ghosh, Jan 28 2017

Formula

Form m by Reversing the digits of n, Add m to n Then Sort the digits of the sum into increasing order to get a(n).
a(n) = A004185(A056964(n)). [Reinhard Zumkeller, Mar 14 2012]

A001127 Trajectory of 1 under map x->x + (x-with-digits-reversed).

Original entry on oeis.org

1, 2, 4, 8, 16, 77, 154, 605, 1111, 2222, 4444, 8888, 17776, 85547, 160105, 661166, 1322332, 3654563, 7309126, 13528163, 49710694, 99312488, 187733887, 976071668, 1842242347, 9274664828, 17559329557, 93151725128, 175304440267, 937348843838, 1775697687577
Offset: 0

Views

Author

N. J. A. Sloane, Jun 05 2002

Keywords

Comments

Normally one stops as soon as a palindrome is reached.
A Reverse and Add! sequence.
Trajectories of 25, 34, 43, 52, 59, 61, 68, 70, 86, 95, ..., merge into this sequence. - Robert G. Wilson v, Dec 16 2005

Crossrefs

Programs

  • Haskell
    a001127 n = a001127_list !! n
    a001127_list = iterate a056964 1 -- Reinhard Zumkeller, Sep 22 2011
  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, (h-> h+ (s->
          parse(cat(s[-i]$i=1..length(s))))(""||h))(a(n-1)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jun 18 2014
  • Mathematica
    NestList[ # + FromDigits@Reverse@IntegerDigits@# &, 1, 30] (* Robert G. Wilson v, Dec 16 2005 *)
    NestList[#+IntegerReverse[#]&,1,30] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 19 2019 *)

A067031 Numbers that are not of the form k + reverse(k) for any k.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 15, 17, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87
Offset: 0

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Examples

			3 belongs to the sequence since there is no k such that k + reverse(k) = 3.
		

Crossrefs

Cf. A056964.
Complement of A067030.

Programs

  • ARIBAS
    function a067031(a,b: integer); var k,n,i,rev: integer; test: boolean; st,nst: string; begin for n := a to b do k := 0; test := 1; while test and k <= n do st := itoa(k); nst := ""; for i := 0 to length(st) - 1 do nst := concat(st[i],nst); end; rev := atoi(nst); if n = k + rev then test := 0; else inc(k); end; end; if k > n then write(n,","); end; end; end; a067031(0,100);
  • Mathematica
    Module[{nn=100,rd},rd=Union[Table[n+FromDigits[ Reverse[ IntegerDigits[ n]]],{n,nn}]];Complement[Range[nn],rd]] (* Harvey P. Dale, Dec 16 2013 *)
Showing 1-10 of 83 results. Next