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.

Previous Showing 11-20 of 83 results. Next

A065206 Numbers which need one 'Reverse and Add' step to reach a palindrome.

Original entry on oeis.org

10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 26, 27, 29, 30, 31, 32, 34, 35, 36, 38, 40, 41, 42, 43, 45, 47, 50, 51, 52, 53, 54, 56, 60, 61, 62, 63, 65, 70, 71, 72, 74, 80, 81, 83, 90, 92, 100, 102, 103, 104, 105, 106, 107, 108, 110, 112, 113, 114, 115, 116, 117
Offset: 1

Views

Author

Klaus Brockhaus, Oct 21 2001

Keywords

Comments

The number of steps starts at 0, so palindromes (A002113) are excluded.
Numbers k such that A033665(k) = 1. - Andrew Howroyd, Dec 05 2024

Crossrefs

Programs

  • ARIBAS
    function revadd_steps(k,stop: integer); var c,n,m,steps,rev: integer; begin n := 0; c := 0; while c < stop do m := n; rev := int_reverse(m); steps := 0; while steps < k and m <> rev do m := m + rev; rev := int_reverse(m); inc(steps); end; if steps = k and m = rev then write(n," "); inc(c); end; inc(n); end; end; revadd_steps(1,66).
    
  • Haskell
    a065206 n = a065206_list !! (n-1)
    a065206_list = filter ((== 1) . a136522 . a056964) a029742_list
    -- Reinhard Zumkeller, Oct 14 2011
    
  • Mathematica
    Select[Range[10,120],!PalindromeQ[#]&&PalindromeQ[#+IntegerReverse[#]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 14 2017 *)
  • PARI
    isok(n,s=1)={for(k=0, s, my(r=fromdigits(Vecrev(digits(n)))); if(r==n, return(k==s)); n += r); 0} \\ Andrew Howroyd, Dec 05 2024

Extensions

Offset corrected by Harry J. Smith, Oct 13 2009

A052008 a(n) = 'n with digits sorted in ascending order' + 'n with digits sorted in descending order'.

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, 121
Offset: 0

Views

Author

Patrick De Geest, Nov 15 1999

Keywords

Comments

a(n) = A004185(n) + A004186(n). - Reinhard Zumkeller, Jun 07 2015

Examples

			E.g., n = 19 -> 19 + 91 = 110.
		

Crossrefs

Cf. A052009; different from A056964.

Programs

  • Haskell
    a052008 n = a004185 n + a004186 n  -- Reinhard Zumkeller, Jun 07 2015
    
  • Mathematica
    f[n_]:=Module[{sidn=Sort[IntegerDigits[n]]},FromDigits[sidn]+ FromDigits[ Reverse[sidn]]]; Array[f,70,0] (* Harvey P. Dale, Nov 13 2011 *)
  • PARI
    for(n=0,100,D=digits(n);R=Vecrev(D);print1(sum(i=1,#D,10^(i-1)*(D[i]+R[i])),", ")) \\ Derek Orr, Feb 26 2017

A061783 Luhn primes: primes p such that p + (p reversed) is also a prime.

Original entry on oeis.org

229, 239, 241, 257, 269, 271, 277, 281, 439, 443, 463, 467, 479, 499, 613, 641, 653, 661, 673, 677, 683, 691, 811, 823, 839, 863, 881, 20011, 20029, 20047, 20051, 20101, 20161, 20201, 20249, 20269, 20347, 20389, 20399, 20441, 20477, 20479, 20507
Offset: 1

Views

Author

Amarnath Murthy, May 24 2001

Keywords

Comments

a(n) has an odd number of digits, as otherwise a(n) + reverse(a(n)) is a multiple of 11. For a(n) > 10, a(n) is prime and thus odd, and therefore the first digit of a(n) is even as otherwise a(n) + reverse(a(n)) is even and composite. - Chai Wah Wu, Aug 19 2015
See A072385 for the resulting primes p + reverse(p) = A056964(p). - M. F. Hasler, Sep 26 2019
Named by Cira and Smarandache (2014) after Norman Luhn, who noted the property of the prime 229 on the Prime Curios! website. - Amiram Eldar, Jun 05 2021

Examples

			229 is a term since 229 is a prime and so is 229 + 922 = 1151.
		

Crossrefs

Cf. A004086 (reverse), A004087 (primes reversed), A056964 (reverse & add), A072385, A086002 (similar, using "rotate" instead of "reverse").

Programs

  • Magma
    [NthPrime(n): n in [1..2400] | IsPrime(s) where s is NthPrime(n)+Seqint(Reverse(Intseq(NthPrime(n))))]; // Bruno Berselli, Aug 05 2013
    
  • Mathematica
    Select[Prime[Range[3000]],PrimeQ[#+FromDigits[Reverse[IntegerDigits[#]]]]&] (* Harvey P. Dale, Nov 27 2010 *)
  • PARI
    isok(p) = { isprime(p) && isprime(p + fromdigits(Vecrev(digits(p)))) } \\ Harry J. Smith, Jul 28 2009
    
  • PARI
    select( is_A061783(p)=isprime(A056964(p)) && isprime(p), primes(8713)) \\  A056964(p)=p+fromdigits(Vecrev(digits(p))). There is no term with 4 digits or starting with an odd digit, i.e., no candidate between prime(168) = 997 and prime(2263) = 20011. Using primes up to prime(8713) = 89989 ensures the list of 5-digit terms is complete. - M. F. Hasler, Sep 26 2019
    
  • Python
    from sympy import isprime, prime
    A061783 = [prime(n) for n in range(1,10**5) if isprime(prime(n)+int(str(prime(n))[::-1]))] # Chai Wah Wu, Aug 14 2014

Extensions

Corrected and extended by Patrick De Geest, May 26 2001
Cross-references added by M. F. Hasler, Sep 26 2019

A033648 Trajectory of 3 under map x->x + (x-with-digits-reversed).

Original entry on oeis.org

3, 6, 12, 33, 66, 132, 363, 726, 1353, 4884, 9768, 18447, 92928, 175857, 934428, 1758867, 9447438, 17794887, 96644658, 182289327, 906271608, 1712444217, 8836886388, 17673772776, 85401510447, 159803020905, 668823329856, 1327746658722, 3606313135953, 7201626272016
Offset: 0

Views

Author

Keywords

Comments

Normally one stops as soon as a palindrome is reached.
A Reverse and Add! sequence.

Crossrefs

Programs

  • Haskell
    a033648 n = a033648_list !! n
    a033648_list = iterate a056964 3 -- Reinhard Zumkeller, Sep 22 2011
  • Maple
    a:= proc(n) option remember; `if`(n=0, 3, (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@# &, 3, 29] (* Robert G. Wilson v, Dec 16 2005 *)

A088753 Numbers k such that the Reverse and Add! trajectory of k (presumably) does not reach a palindrome (with the exception of k itself) and does not join the trajectory of any term m < k.

Original entry on oeis.org

196, 879, 1997, 7059, 9999, 10553, 10563, 10577, 10583, 10585, 10638, 10663, 10668, 10697, 10715, 10728, 10735, 10746, 10748, 10783, 10785, 10787, 10788, 10877, 10883, 10963, 10965, 10969, 10977, 10983, 10985, 12797, 12898, 13097, 13197, 13694, 14096, 14698, 15297, 15597, 18598, 18798
Offset: 1

Views

Author

Klaus Brockhaus, Nov 04 2003

Keywords

Comments

Although the starting number k is regarded as part of the trajectory, it is allowed to be palindromic. Hence palindromes are not excluded from the sequence. A063048 is obtained if palindromes are excluded. The smallest term in A088753 but not in A063048 is 9999, the smallest term in A063048 but not in A088753 is 19098.
W. VanLandingham and others have computed nearly 10^7 terms (all terms < 10^14), cf. W. VanLandingham, 196 and Other Lychrel Numbers.
From M. F. Hasler, Apr 13 2019: (Start)
Lychrel numbers listed here are also called "seeds", in contrast to Kin numbers A023108 which include all terms in the orbits of the former.
It is not easy to determine whether the orbit of a given term will never merge into the orbit of an earlier term. It seems that the property of "disjoint orbit" is as conjectural as the property of not reaching a palindrome. One could specify a "search limit" in order to get a well-defined sequence. The given list of terms has been checked and extended by considering the orbits up to members of size <= 10^199 at least. Given that the number increases by a factor 10 roughly every 2.416 iterations, this corresponds to about 500 iterations. (End)

Examples

			From _M. F. Hasler_, Apr 13 2019: (Start)
All numbers < 196 quickly reach a palindrome under iterations of the reverse-and-add function A056964, cf. A033665.
a(1) = 196 is the smallest integer which appears to never reach a palindrome (checked up to 10^9 iterations!).
Next, A056964(196) = 196 + 691 = 887 is in the orbit of 196 and will therefore never reach a palindrome if 196 does not. However, we do not list this term in this sequence because it is in the orbit of the smaller term 196.
Similarly, 295 + 592 = 887 = A056964(196). Therefore, 295 will also never reach a palindrome if 196 (and therefore 887) doesn't. But again we will not list this number, because its orbit merges into that of the smaller term 196.
The next number which appears to be a Lychrel and has an orbit (conjectured to be) disjoint with that of 196 is 897 = a(2). (End)
		

Crossrefs

Cf. A063048 (variant excluding palindromes), A023108 (Kin numbers), A056964 (reverse-and-add), A006960 (orbit of 196), A033665 (steps to reach a palindrome), A061563 (terminating palindrome of n's orbit), A002113 (palindromes).

Programs

  • Mathematica
    limit = 10^3; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
    utraj = {};
    Select[Range[0,
      20000], (np = # + IntegerReverse[#];
       x = NestWhileList[ # + IntegerReverse[#] &, np, ! PalindromeQ[#] &, 1, limit];
       If[Length[x] >= limit  && Intersection[x, utraj] == {},
        utraj = Union[utraj, x, {np}]; True,
    utraj = Union[utraj, x, {np}]]) &] (* Robert Price, Oct 16 2019 *)
  • PARI
    A088753_upto(LIM=2e4,M=1e199)={my(U=[],a=List());for(n=1,LIM, my(t=n); while( tA002113(t=A056964(t)) && next(2)); setsearch(U,t) && next; U=setunion(U,[t]); print1(n","); listput(a,n)); Set(a)} \\ M. F. Hasler, Apr 13 2019

Extensions

Edited by M. F. Hasler, Apr 13 2019

A033650 Trajectory of 7 under map x --> x + (x-with-digits-reversed).

Original entry on oeis.org

7, 14, 55, 110, 121, 242, 484, 968, 1837, 9218, 17347, 91718, 173437, 907808, 1716517, 8872688, 17735476, 85189247, 159487405, 664272356, 1317544822, 3602001953, 7193004016, 13297007933, 47267087164, 93445163438, 176881317877, 955594506548, 1801200002107
Offset: 0

Views

Author

Keywords

Comments

A Reverse and Add! sequence.
Trajectories of 19, 23, 28, 29, 32, 37, 38, 41, 46, 47, 49, 50, ..., merge into this sequence. - Robert G. Wilson v, Dec 16 2005
A Reverse and Add! sequence.

Crossrefs

Programs

  • Haskell
    a033650 n = a033650_list !! n
    a033650_list = iterate a056964 7 -- Reinhard Zumkeller, Sep 22 2011
  • Maple
    a:= proc(n) option remember; `if`(n=0, 7, (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@# &, 7, 26] (* Robert G. Wilson v *)

A033651 Trajectory of 9 under map x->x + (x-with-digits-reversed).

Original entry on oeis.org

9, 18, 99, 198, 1089, 10890, 20691, 40293, 79497, 158994, 658845, 1207701, 2284722, 4559544, 9019098, 17928207, 88211178, 175322466, 839546037, 1570191975, 7362102726, 13634115363, 49985258994, 99970517988, 188942025987, 978462275868, 1847034540747, 9317488848228
Offset: 0

Views

Author

Keywords

Comments

Trajectories of 27, 36, 45, 54, 63, 72, 81, 90, ..., merge into this sequence. - Robert G. Wilson v, Dec 16 2005.

Crossrefs

Row n=9 of A243238.
Partial sums of A112296.

Programs

  • Haskell
    a063051 n = a063051_list !! n
    a063051_list = iterate a056964 879 -- Reinhard Zumkeller, Sep 22 2011
  • Maple
    a:= proc(n) option remember; `if`(n=0, 9, (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@# &, 9, 26] (* Robert G. Wilson v *)

A015976 One iteration of Reverse and Add is needed to reach a palindrome.

Original entry on oeis.org

1, 2, 3, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 38, 40, 41, 42, 43, 44, 45, 47, 50, 51, 52, 53, 54, 56, 60, 61, 62, 63, 65, 70, 71, 72, 74, 80, 81, 83, 90, 92, 100, 101, 102, 103, 104, 105, 106
Offset: 1

Views

Author

Keywords

Comments

The number of iterations starts at 1, so palindromes (cf. A002113) are not excluded. The corresponding sequence excluding palindromes is A065206.

Crossrefs

Programs

  • Haskell
    a015976 n = a015976_list !! (n-1)
    a015976_list = filter ((== 1) . a136522 . a056964) [1..]
    -- Reinhard Zumkeller, Oct 14 2011
  • Mathematica
    rev[n_] := FromDigits[Reverse[IntegerDigits[n]]]; Select[Range[106], rev[x = # + rev[#]] == x &] (* Jayanta Basu, Jul 24 2013 *)
    Select[Range[120],PalindromeQ[#+IntegerReverse[#]]&] (* Harvey P. Dale, Jul 04 2022 *)

Extensions

Offset corrected by Reinhard Zumkeller, Oct 14 2011

A033649 Trajectory of 5 under map x->x + (x-with-digits-reversed).

Original entry on oeis.org

5, 10, 11, 22, 44, 88, 176, 847, 1595, 7546, 14003, 44044, 88088, 176176, 847847, 1596595, 7553546, 14007103, 44177144, 88354288, 176599676, 853595347, 1597190705, 6668108656, 13236127322, 35608290553
Offset: 0

Views

Author

Keywords

Comments

Trajectories of 15, 21, 24, 30, 39, 42, 48, 51, 57, 60, 69, 75, 78, 84, 87, 93, 96, ..., merge into this sequence. - Robert G. Wilson v, Dec 16 2005
A Reverse and Add! sequence.
Trajectories of 13, 17, 20, 26, 31, 35, 40, 53, 62, 71, 79, 80, 97, ..., merge into this sequence. - Robert G. Wilson v, Dec 16 2005

Crossrefs

Programs

  • Haskell
    a033649 n = a033649_list !! n
    a033649_list = iterate a056964 5 -- Reinhard Zumkeller, Sep 22 2011
  • Maple
    a:= proc(n) option remember; `if`(n=0, 5, (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@# &, 5, 29] (* Robert G. Wilson v, Dec 16 2005 *)

A061230 Numbers k such that k + the reversal of k is a square.

Original entry on oeis.org

0, 2, 8, 29, 38, 47, 56, 65, 74, 83, 92, 110, 143, 164, 198, 242, 263, 297, 341, 362, 396, 440, 461, 495, 560, 594, 693, 792, 891, 990, 10100, 10148, 10340, 10395, 10403, 10683, 10908, 10980, 11138, 11330, 11385, 11673, 11970, 12128, 12320, 12375
Offset: 1

Views

Author

Amarnath Murthy, Apr 23 2001

Keywords

Examples

			8 is a term as 8 + 8 = 16 = 4^2.
56 is a term as 56 + 65 = 121 = 11^2.
		

Crossrefs

Cf. A359011 (for squares).

Programs

  • Maple
    digrev:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    select(t -> issqr(t+digrev(t)),[$0..20000]); # Robert Israel, May 04 2015
  • Mathematica
    Select[Range[0,15000],IntegerQ[Sqrt[#+FromDigits[Reverse[ IntegerDigits[#]]]]]&]  (* Harvey P. Dale, Apr 18 2011 *)
  • PARI
    isok(n) = issquare(n + fromdigits(Vecrev(digits(n)))); \\ Michel Marcus, Aug 04 2019
    
  • Python
    from math import isqrt
    def issquare(n): return isqrt(n)**2 == n
    def ok(n): return issquare(n + int(str(n)[::-1]))
    print([k for k in range(12376) if ok(k)]) # Michael S. Branicky, Dec 09 2022

Extensions

Corrected and extended by Patrick De Geest, May 28 2001
Edited by N. J. A. Sloane, Jul 24 2009
Previous Showing 11-20 of 83 results. Next