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

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

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 *)

A067034 Largest k such that A067030(n) = k + reverse(k).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 10, 6, 7, 8, 9, 20, 30, 40, 50, 60, 70, 80, 90, 100, 91, 110, 93, 120, 94, 95, 130, 96, 97, 140, 98, 99, 150, 200, 160, 210, 170, 220, 180, 230, 190, 240, 250, 300, 260, 310, 270, 320, 280, 330, 290, 340, 350, 400, 360, 410, 370, 420, 380, 430
Offset: 0

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Examples

			a(12) = 30 since A067030(12) = 33 and 30 is the largest k such that 33 = k + reverse(k).
		

Crossrefs

Programs

  • ARIBAS
    function a067034(a,b: integer); var n,k,m,i,rev: integer; st,nst: string; begin for n := a to b do k := 0; m := -1; while 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 m := k; end; inc(k); end; if m >= 0 then write(m,","); end; end; end; a067034(0,500);

A067033 Smallest k such that A067030(n) = k + reverse(k).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 10, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 100, 19, 29, 39, 120, 49, 59, 130, 69, 79, 140, 89, 99, 150, 101, 160, 111, 170, 121, 180, 131, 190, 141, 151, 102, 161, 112, 171, 122, 181, 132, 191, 142, 152, 103, 162, 113, 172, 123, 182, 133, 192
Offset: 0

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Examples

			a(12) = 12 since A067030(12) = 33 and 12 is the smallest k such that 33 = k + reverse(k).
		

Crossrefs

Programs

  • ARIBAS
    function a067033(a,b: integer); var n,k,i,rev: integer; st,nst: string; begin for n := a to b do k := 0; while 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 write(k,",") k := n + 1; else inc(k); end; end; end; end; a067033(0,500);

A067284 a(n) = number of integers k such that k is not of the form m + reverse(m) for any m (cf. A067031) and A067030(n) occurs in the 'Reverse and Add' trajectory of k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 5, 5, 8, 7, 12, 9, 1, 13, 21, 14, 1, 6, 11, 1, 4, 14, 1, 2, 9, 1, 2, 1, 2, 1, 22, 1, 2, 1, 2, 2, 3, 2, 3, 2, 3, 2, 16, 2, 3, 3, 5, 3, 4, 3, 5, 3, 4, 3, 30, 4, 6, 5, 5, 4, 6, 5, 5, 4, 6, 15, 8, 6, 6, 5, 8, 6, 6, 5, 8, 6, 9, 24, 7, 6, 9, 8, 7, 6, 9, 7, 12, 9, 8, 20
Offset: 0

Views

Author

Klaus Brockhaus, Feb 04 2002

Keywords

Comments

For an integer j not in A067030 there exists no integer k of the form m + reverse(m) such that j occurs in the trajectory of k. a(n) >= A067032(n); A067737 gives the terms of A067030 such that a(n) > A067032(n). A067288 gives the records in this sequence, A067287 gives the terms of A067030 at which these records are attained.

Examples

			a(14) = 5, since A067030(14) = 55 and the five integers 7, 23, 32, 41, 50 are not of the form m + reverse(m) for any m and 55 occurs in the trajectory of each of them. a(25) = 11, since A067030(25) = 154 and the eleven integers 1, 25, 34, 43, 52, 59, 61, 68, 70, 86, 95 are not of the form m + reverse(m) for any m and 154 occurs in the trajectory of each of them.
		

Crossrefs

A067035 n sets a new record for the number of integers k such that n = k + reverse(k).

Original entry on oeis.org

0, 22, 33, 44, 55, 66, 77, 88, 99, 1111, 2552, 2662, 2772, 2882, 2992, 3663, 3773, 3883, 3993, 4774, 4884, 4994, 5885, 5995, 6886, 6996, 7887, 7997, 8888, 8998, 9889, 9999, 199991, 258852, 259952, 268862, 269962, 278872, 279972, 288882, 289982
Offset: 1

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Comments

RECORDS transform of A067032. A067036 gives the corresponding records.
Are all terms palindromes? - David A. Corneth, Jan 16 2020

Examples

			33 belongs to the sequence because for three integers k (cf. A067032) we have 33 = k + reverse(k) and for m < 33 there are at most two integers j such that m = j + reverse(j).
		

Crossrefs

Extensions

Offset set to 1 by Giovanni Resta, Jan 16 2020

A067036 Records for the number of integers k such that an integer is of the form k + reverse(k).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 21, 24, 27, 30, 32, 36, 40, 45, 50, 54, 60, 63, 70, 72, 80, 81, 90, 100, 108, 120, 126, 140, 144, 160, 162, 180, 200, 210, 216, 240, 243, 270, 300, 320, 324, 360, 400, 405, 450, 500, 540, 600, 630, 700, 720, 800, 810
Offset: 1

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Comments

RECORDS transform of A067032. A067035 gives the corresponding integers at which these records are attained.

Examples

			3 is a record since there is an integer n (viz. 33, cf. A067032) such that for three integers k we have n = k + reverse(k) and for m < n there are at most two integers j such that m = j + reverse(j).
		

Crossrefs

Extensions

Offset set to 1 by Giovanni Resta, Jan 16 2020

A067287 n sets a new record for the number of integers k such that k is not of the form m + reverse(m) for any m and n occurs in the 'Reverse and Add' trajectory of k (cf. A067284).

Original entry on oeis.org

0, 22, 33, 44, 66, 88, 110, 121, 242, 484, 968, 1837, 2222, 3102, 4444, 4884, 7106, 8888, 12221, 24442, 44044, 48884, 88088, 176176, 293392, 295482, 466664, 597795, 688886, 711106, 797797, 930028, 933328, 997799, 1112111, 1197801, 1686861
Offset: 0

Views

Author

Klaus Brockhaus, Feb 04 2002

Keywords

Comments

A067288 gives the corresponding records.

Examples

			33 belongs to the sequence because three integers k (viz. 3, 21, 30) are not of the form j + reverse(j) for any j and 33 occurs in the "Reverse and Add!" trajectory of these k and for m < 33 there are at most two integers which have the corresponding property.
		

Crossrefs

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Dec 18 2002

A067288 Records for the number of integers k such that k is not of the form m + reverse(m) for any m and for some n A067030(n) occurs in the 'Reverse and Add' trajectory of k (cf. A067284).

Original entry on oeis.org

1, 2, 3, 5, 8, 12, 13, 21, 22, 30, 38, 39, 42, 46, 71, 90, 94, 150, 254, 286, 404, 434, 578, 586, 602, 643, 758, 799, 813, 847, 1131, 1162, 1169, 1334, 1742, 2093, 2120, 2378, 2663, 2892, 3208, 3383, 3585, 3685, 3999, 4818, 4942, 5766, 5959
Offset: 1

Views

Author

Klaus Brockhaus, Feb 04 2002

Keywords

Comments

Successive maxima in sequence A067284. A067287 gives the corresponding integers at which these records are attained.

Examples

			3 is a record, since for A067030(12) = 33 there are three integers k not of the form j + reverse(j) for any j such that 33 occurs in the "Reverse and Add!" trajectory of these k and for m < 33 there are at most two integers which have the corresponding property.
		

Crossrefs

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Dec 18 2002
Offset and a(27) onward corrected by Sean A. Irvine, Dec 12 2023

A068065 Palindromes n for which there is a unique k such that n = k + reverse(k).

Original entry on oeis.org

0, 2, 4, 6, 8, 11, 101, 141, 161, 181, 1001, 10001, 10201, 10401, 10601, 10801, 100001, 1000001, 1002001, 1004001, 1006001, 1008001, 10000001, 100000001, 100020001, 100040001, 100060001, 100080001, 1000000001, 10000000001
Offset: 1

Views

Author

Klaus Brockhaus, Feb 16 2002

Keywords

Comments

Subsequence of A068062; A068062(k) is in this sequence if and only if A068064(k) = 1. At first sight, 121 seems to be missing, but in fact 121 does not belong here (cf. example in A068064).

Examples

			10601 is in the sequence, since 10601 = 10300 + 00301 and for no other k we have 10601 = k + reverse(k).
		

Crossrefs

Showing 1-10 of 14 results. Next