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

A072040 Numbers n of the form k + reverse(k) for exactly two k.

Original entry on oeis.org

22, 187, 202, 222, 242, 262, 282, 302, 322, 342, 362, 382, 1717, 1737, 1757, 1777, 1797, 1817, 1837, 1857, 1877, 1897, 2002, 2871, 3982, 11211, 11411, 11611, 11811, 12011, 12211, 12411, 12611, 12811, 17017, 18128, 18997, 19888, 20002, 20202
Offset: 1

Views

Author

Klaus Brockhaus, Jun 08 2002

Keywords

Comments

In the cognate sequence A071265 two numbers a and b are counted only once, if n = a + b, a = reverse(b), b = reverse(a). Therefore 187 = 89 + 98 = 98 + 89 does not appear in A071265.

Examples

			22 = 11 + 11 = 20 + 02, 187 = 89 + 98 = 98 + 89, 382 = 191 + 191 = 290 + 092.
		

Crossrefs

Programs

  • Maple
    # Maple program from N. J. A. Sloane, Mar 07 2016. Assumes digrev (from the "transforms" file) is available:
    M:=21000; b := Array(1..M,0);
    for n from 1 to M do
    t1:=n+digrev(n);
    if t1 <= M then b[t1]:=b[t1]+1; fi;
    od:
    ans:=[];
    for n from 1 to M do
    if b[n]=2 then ans:=[op(ans),n]; fi; od:
    ans;
  • Mathematica
    M = 10^5; digrev[n_] := IntegerDigits[n] // Reverse // FromDigits; Clear[b]; b[A072040%20=%20Reap%5BFor%5Bn%20=%201,%20n%20%3C=%20M,%20n++,%20If%5Bb%5Bn%5D%20==%202,%20Sow%5Bn%5D%5D%5D%5D%5B%5B2,%201%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]]; A072040 = Reap[For[n = 1, n <= M, n++, If[b[n] == 2, Sow[n]]]][[2, 1]] (* _Jean-François Alcover, Oct 01 2016, after N. J. A. Sloane's Maple code *)

A071914 Numbers n of the form k + reverse(k) for exactly three k.

Original entry on oeis.org

33, 176, 303, 323, 343, 363, 383, 403, 423, 443, 463, 483, 1221, 1616, 1636, 1656, 1676, 1696, 1716, 1736, 1756, 1776, 1796, 2761, 3003, 4983, 12021, 12421, 12621, 12821, 13021, 13221, 13421, 13621, 13821, 16016, 17996, 18238, 19778, 26161
Offset: 0

Views

Author

Klaus Brockhaus, Jun 13 2002

Keywords

Examples

			33 = 12 + 21 = 21 + 12 = 30 + 03, 176 = 79 + 97 = 88 + 88 = 97 + 79, 383 = 142 + 241 = 241 + 142 = 340 + 043.
		

Crossrefs

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

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 11, 12, 14, 16, 18, 101, 141, 161, 181, 198, 201, 221, 241, 261, 281, 1001, 1818, 1838, 1858, 1878, 1898, 1918, 1938, 1958, 1978, 1998, 2981, 10001, 10201, 10401, 10601, 10801, 11001, 11201, 11401, 11601, 11801, 18018, 19998
Offset: 1

Views

Author

Klaus Brockhaus, Jun 17 2002

Keywords

Comments

Subsequence of A067030. First term is A072041(1). A068065 is a subsequence of this sequence.

Examples

			18 = 9 + 9; 261 = 180 + 081; 11401 = 10700 + 00701.
		

Crossrefs

Programs

  • ARIBAS
    var n,k,c,i,rev: integer; st,nst: string; end; m := 1; for n := 0 to 29000 do k := n div 2; c := 0; while k <= n and c < m + 1 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 inc(c); if k mod 10 <> 0 and k <> rev then inc(c); end; end; inc(k); end; if c = m then write(n,","); end; end;
  • Mathematica
    revAdd[n_] := n + FromDigits[Reverse[IntegerDigits[n]]]; ra=Table[revAdd[n], {n, 0, 10^5}]; t=Sort[Tally[ra]]; First /@ Select[t, #[[2]] == 1 && #[[1]] <= Length[ra] &]

A072428 Numbers n for which there are exactly four k such that n = k + reverse(k).

Original entry on oeis.org

44, 165, 404, 424, 444, 464, 484, 504, 524, 544, 564, 584, 1331, 1515, 1535, 1555, 1575, 1595, 1615, 1635, 1655, 1675, 1695, 2112, 2651, 3872, 4004, 5984, 13031, 13231, 13431, 13631, 13831, 14031, 14231, 14431, 14631, 14831, 15015, 16995
Offset: 1

Views

Author

Klaus Brockhaus, Jun 17 2002

Keywords

Comments

Subsequence of A067030. First term is A072041(4).
Includes 4*(10^k+1) for k>=1. - Robert Israel, Jul 12 2019

Examples

			44 = k + reverse(k) for k = 13, 22, 31, 40; 1331 = k + reverse(k) for k = 1030, 1120, 1210, 1300.
		

Crossrefs

Programs

  • ARIBAS
    var n,k,c,i,rev: integer; st,nst: string; end; m := 4; for n := 0 to 20000 do k := n div 2; c := 0; while k <= n and c < m + 1 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 inc(c); if k mod 10 <> 0 and k <> rev then inc(c); end; end; inc(k); end; if c = m then write(n,","); end; end;
  • Maple
    N:= 10^5:
    revdigs:= proc(n) local L, i;
      L:= convert(n, base, 10);
      add(L[-i]*10^(i-1), i=1..nops(L))
    end proc:
    V:= Vector(N):
    for x from 1 to N do
      v:= x + revdigs(x);
      if v <= N then V[v]:= V[v]+1 fi;
    od:
    select(t -> V[t]=4, [$1..N]); # Robert Israel, Jul 12 2019

Extensions

Offset changed by Robert Israel, Jul 12 2019

A072429 Numbers n for which there are exactly five k such that n = k + reverse(k).

Original entry on oeis.org

55, 154, 505, 525, 545, 565, 585, 605, 625, 645, 665, 685, 1414, 1434, 1441, 1454, 1474, 1494, 1514, 1534, 1554, 1574, 1594, 2541, 5005, 6985, 14014, 14041, 14241, 14441, 14641, 14841, 15041, 15241, 15441, 15641, 15841, 15994, 18458, 19558
Offset: 1

Views

Author

Klaus Brockhaus, Jun 17 2002

Keywords

Comments

Subsequence of A067030. First term is A072041(5).
Contains 5*(10^k+1) for k>=1. - Robert Israel, Jul 12 2019

Examples

			55 = k + reverse(k) for k = 14, 23, 32, 41, 50; 1441 = k + reverse(k) for k = 1040, 1130, 1220, 1310, 1400.
		

Crossrefs

Programs

  • ARIBAS
    var n,k,c,i,rev: integer; st,nst: string; end; m := 5; for n := 0 to 24600 do k := n div 2; c := 0; while k <= n and c < m + 1 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 inc(c); if k mod 10 <> 0 and k <> rev then inc(c); end; end; inc(k); end; if c = m then write(n,","); end; end;
  • Maple
    N:= 10^5:
    revdigs:= proc(n) local L, i;
      L:= convert(n, base, 10);
      add(L[-i]*10^(i-1), i=1..nops(L))
    end proc:
    V:= Vector(N):
    for x from 1 to N do
      v:= x + revdigs(x);
      if v <= N then V[v]:= V[v]+1 fi;
    od:
    select(t -> V[t]=5, [$1..N]); # Robert Israel, Jul 12 2019

A072430 Numbers n for which there are exactly six k such that n = k + reverse(k).

Original entry on oeis.org

66, 143, 606, 626, 646, 666, 686, 706, 726, 746, 766, 786, 1313, 1333, 1353, 1373, 1393, 1413, 1433, 1453, 1473, 1493, 1551, 2222, 2431, 3113, 3762, 4873, 6006, 7986, 13013, 14993, 15051, 15251, 15451, 15651, 15851, 16051, 16126, 16251, 16451
Offset: 1

Views

Author

Klaus Brockhaus, Jun 17 2002

Keywords

Comments

Subsequence of A067030. First term is A072041(6).
Includes 6*(10^k+1) for k >= 1. - Robert Israel, Jul 12 2019

Examples

			66 = k + reverse(k) for k = 15, 24, 33, 42, 51, 60; 626 = k + reverse(k) for k = 115, 214, 313, 412, 511, 610.
		

Crossrefs

Programs

  • ARIBAS
    var n,k,c,i,rev: integer; st,nst: string; end; m := 6; for n := 0 to 17500 do k := n div 2; c := 0; while k <= n and c < m + 1 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 inc(c); if k mod 10 <> 0 and k <> rev then inc(c); end; end; inc(k); end; if c = m then write(n,","); end; end;
  • Maple
    N:= 10^5:
    revdigs:= proc(n) local L, i;
      L:= convert(n, base, 10);
      add(L[-i]*10^(i-1), i=1..nops(L))
    end proc:
    V:= Vector(N):
    for x from 1 to N do
      v:= x + revdigs(x);
      if v <= N then V[v]:= V[v]+1 fi;
    od:
    select(t -> V[t]=6, [$1..N]); # Robert Israel, Jul 12 2019

Extensions

Offset changed to 1 by Robert Israel, Jul 12 2019

A072431 Numbers n for which there are exactly seven k such that n = k + reverse(k).

Original entry on oeis.org

77, 132, 707, 727, 747, 767, 787, 807, 827, 847, 867, 887, 1212, 1232, 1252, 1272, 1292, 1312, 1332, 1352, 1372, 1392, 1661, 2321, 7007, 8987, 12012, 13992, 16061, 16261, 16461, 16661, 16861, 17061, 17261, 17461, 17661, 17861, 18678, 19338
Offset: 1

Views

Author

Klaus Brockhaus, Jun 17 2002

Keywords

Comments

Subsequence of A067030. First term is A072041(7).

Examples

			77 = k + reverse(k) for k = 16, 25, 34, 43, 52, 61, 70; 132 = k + reverse(k) for k = 39, 48, 57, 66, 75, 84, 93.
		

Crossrefs

Programs

  • ARIBAS
    var n,k,c,i,rev: integer; st,nst: string; end; m := 7; for n := 0 to 22600 do k := n div 2; c := 0; while k <= n and c < m + 1 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 inc(c); if k mod 10 <> 0 and k <> rev then inc(c); end; end; inc(k); end; if c = m then write(n,","); end; end;
  • Mathematica
    f[n_] := n + FromDigits@ Reverse@ IntegerDigits@ n; fQ[n_] := Block[{c = 0, k = 1}, While[k < n && n != f@ k, k++]; While[k < n, If[n == f@ k, c++]; k += 9]; c == 7]; Select[ Range@ 20000, fQ]
    revAdd[n_] := n + FromDigits[Reverse[IntegerDigits[n]]]; ra=Table[revAdd[n], {n, 0, 10^5}]; t=Sort[Tally[ra]]; First /@ Select[t, #[[2]] == 7 && #[[1]] < Length[ra] &]

A072432 Numbers n for which there are exactly eight k such that n = k + reverse(k).

Original entry on oeis.org

88, 808, 828, 848, 868, 888, 908, 928, 948, 968, 988, 1131, 1151, 1171, 1191, 1211, 1231, 1251, 1271, 1291, 1771, 2211, 2332, 3652, 4114, 5874, 8008, 9988, 12991, 15125, 16885, 17071, 17271, 17347, 17471, 17671, 17871, 18071, 18271, 18471
Offset: 1

Views

Author

Klaus Brockhaus, Jun 17 2002

Keywords

Comments

Subsequence of A067030. First term is A072041(8).
Contains 8*10^k+8 for all k>=1. - Robert Israel, Jul 12 2019

Examples

			88 = k + reverse(k) for k = 17, 26, 35, 44, 53, 62, 71, 80.
		

Crossrefs

Programs

  • ARIBAS
    var n,k,c,i,rev: integer; st,nst: string; end; m := 8; for n := 0 to 18800 do k := n div 2; c := 0; while k <= n and c < m + 1 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 inc(c); if k mod 10 <> 0 and k <> rev then inc(c); end; end; inc(k); end; if c = m then write(n,","); end; end;
  • Maple
    N:= 10^5:
    revdigs:= proc(n) local L, i;
      L:= convert(n, base, 10);
      add(L[-i]*10^(i-1), i=1..nops(L))
    end proc:
    V:= Vector(N):
    for x from 1 to N do
      v:= x + revdigs(x);
      if v <= N then V[v]:= V[v]+1 fi
    od:
    select(t -> V[t]=8, [$1..N]); # Robert Israel, Jul 12 2019
  • Mathematica
    krk8Q[n_]:=Count[Range[n-1],?(#+FromDigits[Reverse[ IntegerDigits[#]]] ==n&)]==8; Select[Range[20000],krk8Q]  (* _Harvey P. Dale, Apr 02 2011 *)

Extensions

Offset changed by Robert Israel, Jul 12 2019

A072433 Numbers n for which there are exactly nine k such that n = k + reverse(k).

Original entry on oeis.org

99, 110, 121, 909, 929, 949, 969, 989, 1009, 1010, 1029, 1030, 1049, 1050, 1069, 1070, 1089, 1090, 1110, 1130, 1150, 1170, 1190, 1881, 2101, 3223, 4763, 9009, 10010, 10989, 11990, 16236, 17776, 18081, 18281, 18481, 18681, 18881, 18898
Offset: 1

Views

Author

Klaus Brockhaus, Jun 17 2002

Keywords

Comments

Subsequence of A067030. First term is A072041(9).
Contains 9*10^k+9 for k>=1 and 10^k+10 for k>=2. - Robert Israel, Jul 12 2019

Examples

			99 = k + reverse(k) for k = 18, 27, 36, 45, 54, 63, 72, 81, 90.
		

Crossrefs

Programs

  • ARIBAS
    var n,k,c,i,rev: integer; st,nst: string; end; m := 9; for n := 0 to 19500 do k := n div 2; c := 0; while k <= n and c < m + 1 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 inc(c); if k mod 10 <> 0 and k <> rev then inc(c); end; end; inc(k); end; if c = m then write(n,","); end; end;
  • Maple
    N:= 10^5:
    revdigs:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    V:= Vector(N):
    for x from 1 to N do
      v:= x + revdigs(x);
      if v <= N then V[v]:= V[v]+1 fi;
    od:
    select(t -> V[t]=10, [$1..N]); # Robert Israel, Jul 12 2019

Extensions

Offset changed by Robert Israel, Jul 12 2019

A072434 Numbers n for which there are exactly ten k such that n = k + reverse(k).

Original entry on oeis.org

1111, 1991, 2442, 3542, 5115, 6875, 11011, 14124, 15884, 17457, 18557, 19008, 19091, 19291, 19491, 19691, 19891, 20091, 20291, 20491, 20691, 20891, 24042, 24242, 24442, 24642, 24842, 25042, 25242, 25442, 25642, 25842, 34142, 34342
Offset: 1

Views

Author

Klaus Brockhaus, Jun 17 2002

Keywords

Comments

Subsequence of A067030. First term is A072041(10).
Contains 11*10^k+11, 19*10^k+91, 24*10^k+42, 51*10^k+15 for all k>=2. - Robert Israel, Jul 12 2019

Examples

			2442 = k + reverse(k) for k = 1041, 1131, 1221, 1311, 1401, 2040, 2130, 2220, 2310, 2400.
		

Crossrefs

Programs

  • ARIBAS
    var n,k,c,i,rev: integer; st,nst: string; end; m := 10; for n := 0 to 35000 do k := n div 2; c := 0; while k <= n and c < m + 1 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 inc(c); if k mod 10 <> 0 and k <> rev then inc(c); end; end; inc(k); end; if c = m then write(n,","); end; end;
  • Maple
    N:= 10^5:
    revdigs:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    V:= Vector(N):
    for x from 1 to N do
      v:= x + revdigs(x);
      if v <= N then V[v]:= V[v]+1 fi
    od:
    select(t -> V[t]=10, [$1..N]); # Robert Israel, Jul 12 2019

Extensions

Offset changed by Robert Israel, Jul 12 2019
Showing 1-10 of 11 results. Next