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

A117816 Number of steps until the RADD sequence T(k+1) = n + R(T(k)), T(0) = 1, enters a cycle; -1 if no cycle is ever reached. (R=A004086: reverse digits).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 2, 31, 15, -1, 721, 9, 1, 6, -1, 3, 5, 28, 29, 131, 23, 1, 31, 6, -1, 1, 19, 1, 53, 4, 406, 34, 254, 8, -1, 3, 245, 1, 3, 2, 422, 42, 308, 1, -1, 2, 2, 49, 1, 1371, 13, 1, 1, 2, -1, 78, 65, 1, 809, 1575, 5, 43, 31, 2, -1, 33, 2, 21, 192, 857, 91, 1, 2, 2, -1, 2, 491, 1, 2, 1, 81, 49, 1, 2, -1, 35, 197, 72, 1, 12, 79, 1, 6004, 1, -1, 52, 10264, 9, 28, 2, 2, 1, 427, 1, -1, 1, 1, 49, 167
Offset: 1

Views

Author

N. J. A. Sloane, following discussions with Luc Stevens, May 04 2006

Keywords

Comments

Comments following discussions with David Applegate, May 05 2006: (Start)
Certainly a(10) = -1 and probably a(n) is always -1 if n is a multiple of 10. Furthermore a(15) is almost certainly -1: T_15 has not reached a cycle in 10^7 terms (see A118532).
(End)
If n is a multiple of 10 the operation can never generate a trailing zero and so is reversible. So it loops only if it returns to the start, which is impossible. Hence a(10k) = -1. - Martin Fuller, May 12 2006
I suspect a(115) = 385592406, A117817(115) = 79560. Can someone confirm? - Martin Fuller, May 12 2006
The map f: x -> R(x)+n is injective, f(x)=f(y) <=> R(x)=R(y) <=> x=y, unless x or y only differ in trailing zeros. For n=10k, however, trailing zeros can never occur. (This also implies that the terms are of increasing length.) Thus, for n=10k, no number can occur twice in the orbit of 1 under f, i.e., a(10k)=-1. A sketch of proof for a(15)=-1 is given in A118532. As of today, no other n with a(n)=-1 seems to be known. - M. F. Hasler, May 06 2012

Examples

			T_2 enters a cycle of length 81 after 1 step.
		

Crossrefs

For T_1, T_2, ..., T_16 (omitting T_9, which is uninteresting) see A117230, A117521, A118517, A117828, A117800, A118525, A118526, A118527, A117841, A118528, A118529, A118530, A118531, A118532, A118533.
Cf. A117817.

Programs

  • Mathematica
    ReverseNum[n_] := FromDigits[Reverse[IntegerDigits[n]]]; maxLen=10000; Table[z=1; lst={1}; While[z=ReverseNum[z]+n; !MemberQ[lst,z] && Length[lst]T. D. Noe *)
  • PARI
    A117816(n,L=10^5,S=1)={ for(F=0,1, my(u=Vecsmall(S)); while(L-- & #u<#u=vecsort(concat(u,Vecsmall(S=A004086(S)+n)),,8),); L || F=1; /* 1st run counts until repetition, now subtract cycle length */ F || L=1+#u); L-1}

Extensions

a(21)-a(33) from Luc Stevens, May 08 2006
a(33) onwards from T. D. Noe, May 10 2006
Further terms from Martin Fuller, May 12 2006

A102111 Iccanobirt numbers (1 of 15): a(n) = a(n-1) + a(n-2) + R(a(n-3)), where R is the digit reversal function A004086.

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 7, 13, 24, 44, 99, 185, 328, 612, 1521, 2956, 4693, 8900, 20185, 33049, 53332, 144483, 291848, 459666, 1135955, 2443813, 4246722, 12285846, 19716010, 34278280, 118852511, 154192582, 281332336, 550783729, 1117407516, 2301424427
Offset: 0

Views

Author

Jonathan Vos Post and Ray Chandler, Dec 30 2004

Keywords

Comments

Digit reversal variation of tribonacci numbers A000073.
Inspired by Iccanobif numbers: A001129, A014258-A014260.

Crossrefs

Programs

  • Magma
    a:=[0,0,1];[n le 3 select a[n] else Self(n-1) + Self(n-2) + Seqint(Reverse(Intseq(Self(n-3)))):n in [1..36]]; // Marius A. Burtea, Oct 23 2019
  • Maple
    read("transforms") ;
    A102111 := proc(n)
        option remember;
        if n <= 2 then
            return op(n+1,[0,0,1]) ;
        else
            return procname(n-1)+procname(n-2)+digrev(procname(n-3)) ;
        end if;
    end proc:
    seq(A102111(n),n=0..20) ; # R. J. Mathar, Nov 17 2012
  • Mathematica
    R[n_]:=FromDigits[Reverse[IntegerDigits[n]]];Clear[a];a[0]=0;a[1]=0;a[2]=1;a [n_]:=a[n]=a[n-1]+a[n-2]+R[a[n-3]];Table[a[n], {n, 0, 40}]
    nxt[{a_,b_,c_}]:={b,c,IntegerReverse[a]+b+c}; NestList[nxt,{0,0,1},40][[;;,1]] (* Harvey P. Dale, Jul 18 2023 *)
  • Python
    def R(n):
      n_str = str(n)
      reversedn_str = n_str[::-1]
      reversedn = int(reversedn_str)
      return reversedn
    def A(n):
      if n == 0:
        return 0
      elif n == 1:
        return 0
      elif n == 2:
        return 1
      elif n >= 3:
        return A(n-1)+A(n-2)+R(A(n-3))
    for i in range(0,20):
      print(A(i)) # Dylan Delgado, Oct 23 2019
    

Formula

A004086(a(n)) = A102119(n).

A102125 Iccanobirt numbers (15 of 15): a(n) = R(R(a(n-1)) + R(a(n-2)) + R(a(n-3))), where R is the digit reversal function A004086.

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 7, 31, 42, 44, 18, 941, 472, 405, 729, 5071, 6313, 8675, 90601, 31591, 9853, 11733, 31865, 31149, 736481, 365533, 313416, 3154311, 9834802, 5123383, 7112507, 12796921, 35055832, 19867834, 56610708, 906334841, 561210372
Offset: 0

Views

Author

Jonathan Vos Post and Ray Chandler, Dec 30 2004

Keywords

Comments

Digit reversal variation of tribonacci numbers A000073.
Inspired by Iccanobif numbers: A001129, A014258-A014260.

Crossrefs

Programs

  • Maple
    R:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||n):
    a:= proc(n) option remember; `if`(n<3, binomial(n,2),
          R(R(a(n-1)) + R(a(n-2)) + R(a(n-3))))
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jun 18 2014
  • Mathematica
    R[n_]:=FromDigits[Reverse[IntegerDigits[n]]];Clear[a];a[0]=0;a[1]=0;a[2]=1;a [n_]:=a[n]=R[R[a[n-1]]+R[a[n-2]]+R[a[n-3]]];Table[a[n], {n, 0, 40}]
    rev[n_]:=FromDigits[Reverse[IntegerDigits[n]]]; nxt[{a_, b_, c_}] := {b, c, rev[rev[a] + rev[b] + rev[c]]}; Transpose[NestList[nxt,{0,0,1},40]][[1]] (* Harvey P. Dale, Mar 20 2015 *)
    nxt[{a_,b_,c_}]:=With[{ir=IntegerReverse},{b,c,ir[ir[a]+ir[b]+ir[c]]}]; NestList[nxt,{0,0,1},40][[;;,1]] (* Harvey P. Dale, Jul 22 2025 *)

Formula

a(n) = A004086(A102117(n)).

A061205 a(n) = n times R(n) where R(n) (A004086) is the digit reversal of n.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 10, 121, 252, 403, 574, 765, 976, 1207, 1458, 1729, 40, 252, 484, 736, 1008, 1300, 1612, 1944, 2296, 2668, 90, 403, 736, 1089, 1462, 1855, 2268, 2701, 3154, 3627, 160, 574, 1008, 1462, 1936, 2430, 2944, 3478, 4032, 4606
Offset: 0

Views

Author

Amarnath Murthy, Apr 21 2001

Keywords

Comments

Every third term is divisible by 9, no other term is divisible by 3. - Alonso del Arte, Mar 04 2013

Examples

			a(10) = 10 = 10 * 01.
a(11) = 121 = 11 * 11.
a(12) = 252 = 12 * 21.
a(13) = 403 = 13 * 31.
		

Crossrefs

Cf. A004086, A203924 (triple repetitions).

Programs

Extensions

Corrected and extended by Patrick De Geest, Jun 04 2001

A161594 a(n) = R(f(n)), where R = A004086 = reverse (decimal) digits, f = A071786 = reverse digits of prime factors.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 11, 21, 13, 41, 51, 61, 17, 81, 19, 2, 12, 22, 23, 42, 52, 26, 72, 82, 29, 3, 31, 23, 33, 241, 53, 63, 37, 281, 39, 4, 41, 24, 43, 44, 54, 46, 47, 84, 94, 5, 312, 421, 53, 45, 55, 65, 372, 481, 59, 6, 61, 62, 36, 46, 551, 66, 67, 482, 69, 7, 71, 27
Offset: 1

Views

Author

J. H. Conway & Tanya Khovanova, Jun 14 2009

Keywords

Comments

Might be called TITO(n), turning n inside out then turning outside in.
Here is the operation: take a number n and find its prime factors. Reverse the digits of every prime factor (for example, replace 17 by 71). Multiply the factors respecting multiplicities. For example, if the original number was 17^2*43^3, the new product will be 71^2*34^3. After that, reverse the resulting number.

Examples

			a(34) = 241, because 34 = 2*17, f(34) = 2*71 = 142, and reversing gives 241.
		

Crossrefs

Programs

  • Haskell
    a161594 = a004086 . a071786  -- Reinhard Zumkeller, Oct 14 2011
    
  • Maple
    read("transforms") ; A071786 := proc(n) local ifs,a,d ; ifs := ifactors(n)[2] ; a := 1 ; for d in ifs do a := a*digrev(op(1,d))^op(2,d) ; od: a ; end: A161594 := proc(n) digrev(A071786(n)) ; end: seq(A161594(n),n=1..80) ; # R. J. Mathar, Jun 16 2009
    # second Maple program:
    r:= n-> (s-> parse(cat(seq(s[-i], i=1..length(s)))))(""||n):
    a:= n-> r(mul(r(i[1])^i[2], i=ifactors(n)[2])):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 19 2017
  • Mathematica
    reversepower[{n_, k_}] := FromDigits[Reverse[IntegerDigits[n]]]^k f[n_] := FromDigits[ Reverse[IntegerDigits[Times @@ Map[reversepower, FactorInteger[n]]]]] Table[f[n], {n, 100}]
    Table[IntegerReverse[Times@@Flatten[Table[IntegerReverse[#[[1]]],#[[2]]]& /@FactorInteger[n]]],{n,100}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 21 2016 *)
  • PARI
    R=A004086; A161594(n)={n=factor(n);n[,1]=apply(R,n[,1]);R(factorback(n))} \\  M. F. Hasler, Jun 24 2009. Removed code for R here, see A004086 for most recent & efficient version. - M. F. Hasler, May 11 2015
    
  • Python
    from math import prod
    from sympy import factorint
    def f(n): return prod(int(str(p)[::-1])**e for p, e in factorint(n).items())
    def R(n): return int(str(n)[::-1])
    def a(n): return 1 if n == 1 else R(f(n))
    print([a(n) for n in range(1, 73)]) # Michael S. Branicky, Mar 28 2022

Formula

a(p) = p, for prime p.
a(A161598(n)) <> A161598(n); a(A161597(n)) = A161597(n); A010051(a(A161600(n))) = 1.
From M. F. Hasler, Jun 25 2009: (Start)
a( p*10^k ) = p for any prime p.
Proof: if gcd( p, 2*5) = 1, then a( p * 10^k ) = R( R(p) * R(2)^k * R(5)^k ) = R( R(p) * 10^k ) = R(R(p)) = p;
if gcd(p, 2*5) = 2, then p=2 and a( p * 10^k ) = R( R(2)^(k+1) * R(5)^k ) = R( 2 * 10^k ) = 2 = p and mutatis mutandis for gcd(p, 2*5) = 5. (End)

Extensions

Simpler definition from R. J. Mathar, Jun 16 2009
Edited by N. J. A. Sloane, Jun 23 2009

A102112 Iccanobirt numbers (2 of 15): a(n) = a(n-1) + R(a(n-2)) + a(n-3), where R is the digit reversal function A004086.

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 7, 13, 24, 62, 117, 167, 940, 1818, 2034, 11155, 17275, 74420, 142846, 162568, 885229, 1893336, 2978492, 10197702, 15039830, 38797423, 52888176, 100407789, 206394037, 1246986214, 2077887605, 6411178063, 12726051979
Offset: 0

Views

Author

Jonathan Vos Post and Ray Chandler, Dec 30 2004

Keywords

Comments

Digit reversal variation of tribonacci numbers A000073.
Inspired by Iccanobif numbers: A001129, A014258-A014260.

Crossrefs

Programs

  • Mathematica
    R[n_]:=FromDigits[Reverse[IntegerDigits[n]]];Clear[a];a[0]=0;a[1]=0;a[2]=1;a [n_]:=a[n]=a[n-1]+R[a[n-2]]+a[n-3];Table[a[n], {n, 0, 40}]
    nxt[{a_,b_,c_}]:={b,c,a+FromDigits[Reverse[IntegerDigits[b]]]+c}; Transpose[ NestList[nxt,{0,0,1},40]][[1]] (* Harvey P. Dale, Jul 29 2013 *)

Formula

A004086(a(n)) = A102120(n).

A102124 Iccanobirt numbers (14 of 15): a(n) = R(R(a(n-1)) + R(a(n-2)) + a(n-3)), where R is the digit reversal function A004086.

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 7, 31, 42, 44, 99, 581, 823, 216, 1251, 6592, 3964, 98, 47311, 72451, 99862, 73698, 789881, 684873, 171146, 8359081, 2855313, 6626115, 92901661, 80528542, 25591874, 127303561, 518156392, 14745484, 711014964, 521206301
Offset: 0

Views

Author

Jonathan Vos Post and Ray Chandler, Dec 30 2004

Keywords

Comments

Digit reversal variation of tribonacci numbers A000073.
Inspired by Iccanobif numbers: A001129, A014258-A014260.

Crossrefs

Programs

  • Maple
    R:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||n):
    a:= proc(n) option remember; `if`(n<3, binomial(n, 2),
           R(R(a(n-1)) + R(a(n-2)) + a(n-3)) )
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jun 18 2014
  • Mathematica
    R[n_]:=FromDigits[Reverse[IntegerDigits[n]]];Clear[a];a[0]=0;a[1]=0;a[2]=1;a [n_]:=a[n]=R[R[a[n-1]]+R[a[n-2]]+a[n-3]];Table[a[n], {n, 0, 40}]

Formula

a(n) = A004086(A102116(n)).

A062917 Nonpalindromic numbers k such that k is not divisible by 10 and k*R(k) is a square, where R(k) is the reversal of k (A004086).

Original entry on oeis.org

144, 169, 288, 441, 528, 768, 825, 867, 882, 961, 1089, 1584, 2178, 4851, 8712, 9801, 10404, 10609, 10989, 12544, 12769, 13104, 14544, 14884, 15984, 20808, 21978, 26208, 27648, 27848, 36828, 40131, 40401, 44521, 44541, 48139, 48841, 48951
Offset: 1

Views

Author

Amarnath Murthy, Jul 02 2001

Keywords

Comments

The sequence has infinitely many terms, some of which can be derived from 1089 and 2178.

Examples

			2178 is a term as 2178*8712 = 4356^2.
10891089 is a term as 10891089*98019801 = 32673267^2.
		

Crossrefs

Cf. A004086.
Subsequence of A029742.

Programs

  • Mathematica
    okQ[n_]:=Module[{idn=IntegerDigits[n],ridn},ridn=Reverse[idn];idn!= ridn && !Divisible[n,10]&&IntegerQ[Sqrt[n FromDigits[ridn]]]]; Select[Range[ 50000], okQ] (* Harvey P. Dale, Dec 08 2012 *)

Extensions

More terms from Reiner Martin, Jul 10 2001

A102113 Iccanobirt numbers (3 of 15): a(n) = a(n-1) + R(a(n-2)) + R(a(n-3)), where R is the digit reversal function A004086.

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 7, 13, 24, 62, 135, 203, 760, 1593, 1962, 5980, 12622, 16208, 39724, 142606, 265660, 914694, 1587497, 2150478, 10594748, 27283111, 120773124, 216660897, 649176190, 1868619823, 2758358381, 6139199008, 11266906261
Offset: 0

Views

Author

Jonathan Vos Post and Ray Chandler, Dec 30 2004

Keywords

Comments

Digit reversal variation of tribonacci numbers A000073.
Inspired by Iccanobif numbers: A001129, A014258-A014260.

Crossrefs

Programs

  • Maple
    R:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||n):
    a:= proc(n) option remember; `if`(n<3, binomial(n, 2),
           a(n-1) + R(a(n-2)) + R(a(n-3)) )
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jun 18 2014
  • Mathematica
    R[n_]:=FromDigits[Reverse[IntegerDigits[n]]];Clear[a];a[0]=0;a[1]=0;a[2]=1;a [n_]:=a[n]=a[n-1]+R[a[n-2]]+R[a[n-3]];Table[a[n], {n, 0, 40}]
    nxt[{a1_,a2_,a3_}]:={a2,a3,a3+FromDigits[Reverse[IntegerDigits[ a1]]]+ FromDigits[ Reverse[ IntegerDigits[a2]]]}; Transpose[NestList[nxt,{0,0,1},40]][[1]] (* Harvey P. Dale, Oct 17 2012 *)
    nxt[{a_,b_,c_}]:={b,c,c+IntegerReverse[b]+IntegerReverse[a]}; NestList[ nxt,{0,0,1},40][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 10 2016 *)

Formula

A004086(a(n)) = A102121(n).

A102115 Iccanobirt numbers (5 of 15): a(n) = R(a(n-1)) + a(n-2) + R(a(n-3)), where R is the digit reversal function A004086.

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 7, 13, 42, 44, 117, 779, 1138, 9801, 3204, 22135, 57415, 77633, 144214, 541549, 1123036, 7257201, 3095708, 21636315, 55486847, 104580673, 482935860, 247988412, 1073911003, 3317721397, 9220077878, 15106615327, 89503015162
Offset: 0

Views

Author

Jonathan Vos Post and Ray Chandler, Dec 30 2004

Keywords

Comments

Digit reversal variation of tribonacci numbers A000073.
Inspired by Iccanobif numbers: A001129, A014258-A014260.

Crossrefs

Programs

  • Mathematica
    R[n_]:=FromDigits[Reverse[IntegerDigits[n]]];Clear[a];a[0]=0;a[1]=0;a[2]=1;a [n_]:=a[n]=R[a[n-1]]+a[n-2]+R[a[n-3]];Table[a[n], {n, 0, 40}]
    nxt[{a_,b_,c_}]:={b,c,Total[FromDigits/@Reverse/@IntegerDigits[ {a,c}]]+b}; Transpose[NestList[nxt,{0,0,1},35]][[1]] (* Harvey P. Dale, Dec 19 2011 *)

Formula

A004086(a(n)) = A102123(n).
Showing 1-10 of 587 results. Next