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 41-50 of 51 results. Next

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

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

Original entry on oeis.org

2552, 3333, 3432, 4224, 4653, 5764, 6116, 7876, 13123, 14883, 15235, 16346, 16775, 17567, 17666, 18447, 25052, 25252, 25452, 25652, 25852, 26052, 26252, 26452, 26652, 26852, 33033, 33132, 33233, 33332, 33433, 33532, 33633, 33732, 33833
Offset: 1

Views

Author

Klaus Brockhaus, Jun 17 2002

Keywords

Comments

Subsequence of A067030. First term is A072041(12).
Includes 25*10^k+52, 33*10^k+33, 42*10^k+24 and 61*10^k+16 for k >= 2. - Robert Israel, Jul 12 2019

Examples

			2552 = k + reverse(k) for k = 1051, 1141, 1231, 1321, 1411, 1501, 2050, 2140, 2230, 2320, 2410, 2500.
		

Crossrefs

Programs

  • ARIBAS
    var n,k,c,i,rev: integer; st,nst: string; end; m := 12; for n := 0 to 34200 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]=12, [$1..N]); # Robert Israel, Jul 12 2019
  • Mathematica
    Module[{nn=40000},Select[Tally[Table[n+IntegerReverse[n],{n,nn}]],#[[2]] == 12&&#[[1]]Harvey P. Dale, Apr 25 2020 *)

A088180 a(n) is the number of numbers m < 10^n for which there is at least one k such that k + reverse(k) = m.

Original entry on oeis.org

1, 5, 19, 112, 368, 2161, 7033, 41140, 133730, 781884, 2541197, 14856466, 48283738, 282274893, 917394087, 5363229225, 17430497086, 101901374524, 331179473681, 1936126175213, 6292410089388, 36786397511512, 119555791973835, 698941553280624, 2271560048351176
Offset: 0

Views

Author

Klaus Brockhaus, Sep 22 2003

Keywords

Comments

Number of terms of A067030 below 10^n.
a(16)-a(18) are based on two empirically detected recursive formulas. [Lars Blomberg, Nov 25 2011]

Examples

			a(1) = 5 since 0, 2, 4, 6, 8 are the terms of A067030 which are smaller than 10^1.
		

Crossrefs

Cf. A067030.

Extensions

a(9)-a(10) from Donovan Johnson, Sep 22 2009
a(11)-a(18) from Lars Blomberg, Dec 19 2011
a(19)-a(24) from Hiroaki Yamanouchi, Sep 04 2014

A298972 Number of positive integers k < n such that n occurs in the Reverse-and-Add trajectory of k.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 2, 2, 0, 1, 0, 4, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Felix Fröhlich, Jan 30 2018

Keywords

Comments

Number of integers k < n such that n occurs in row k of A243238.
For n > 0, a(n) = 0 iff n is a term of A067031.
For n > 0, a(n) > 0 iff n is a term of A067030.

Examples

			For n = 22: There exist 4 positive integers k < 22 such that 22 occurs in the Reverse-and-Add trajectory of k, namely 5, 10, 11 and 20, so a(22) = 4.
		

Crossrefs

Programs

  • Mathematica
    Block[{nn = 85, s}, s = Array[Union@ NestWhileList[# + IntegerReverse@ # &, #, # < nn &, 1, nn] &, nn]; Array[Count[Take[s, # - 1], #, 2] &, nn + 1, 0]] (* Michael De Vlieger, Feb 01 2018 *)
  • PARI
    a(n) = my(i=0); for(k=1, n-1, my(x=k); while(x < n, x=x+eval(concat(Vecrev(Str(x))))); if(x==n, i++)); i

A358880 Squares of the form k + reverse(k) for at least one k.

Original entry on oeis.org

4, 16, 121, 484, 625, 1089, 10201, 14641, 19881, 40804, 49284, 69696, 91809, 94249, 203401, 698896, 1002001, 1234321, 1490841, 1517824, 4008004, 4276624, 4460544, 4937284, 5313025, 6325225, 6895876, 6948496, 7706176, 9018009, 15665764, 15776784, 16120225
Offset: 1

Views

Author

Jon E. Schoenfield, Dec 04 2022

Keywords

Examples

			56 + reverse(56) = 56 + 65 = 121 = 11^2, so 121 is a term.
		

Crossrefs

Programs

  • Python
    from math import isqrt
    def aupto(lim): return sorted(set(t for t in (k + int(str(k)[::-1]) for k in range(1, lim+1)) if t <= lim and isqrt(t)**2 == t))
    print(aupto(10**7)) # Michael S. Branicky, Dec 25 2022

Formula

a(n) = A356648(n)^2. - Michel Marcus, Dec 25 2022

A227642 Cubes which can be represented as sum of a prime and its reverse in at least one way.

Original entry on oeis.org

353393243, 1058089859, 12503322161, 117001919971, 344030029343
Offset: 1

Views

Author

Shyam Sunder Gupta, Jul 18 2013

Keywords

Comments

a(6) > 2*10^13. - Giovanni Resta, Jul 25 2013

Examples

			353393243 = 203993941 + 149399302.
		

Crossrefs

Programs

  • Mathematica
    cubeQ[n_Integer?Positive] := IntegerQ[n^(1/3)] ; Union[Select[Table[Prime[x] + FromDigits[Reverse[IntegerDigits[Prime[x]]]], {x, 1000000000}], cubeQ]]

Extensions

a(5) from Giovanni Resta, Jul 25 2013

A323190 Integers k for which there exists an integer j such that s(k) + j + reversal(s(k) + j) = k where s(k) is the sum of digits of k.

Original entry on oeis.org

0, 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, 444, 463
Offset: 1

Views

Author

Viorel Nitica, Jan 06 2019

Keywords

Comments

Theorem: all palindromes that have an even number of digits and all palindromes that have an odd number of digits and the digit in the middle is even are in this sequence.

Examples

			k=10 is a term because a solution exists with j=4: s(10)=1, s(k) + j + reversal(s(k) + j) = 1 + 4 + reversal(1 + 4) = 10.
		

Crossrefs

Cf. A007953 (sum of digits), A004086 (reversal).
A305130 is a subsequence.
This sequence is a subsequence of A067030.

Programs

  • Java
    package com.company;
    public class Main {
    public static void main(String args[]) {
    int counter=1;
    for (int i = 0; i < 10000; i++) {
    for (int j = 0; j < 10000; j++) {
    int sumPlus = sumDigits(i) + j;
    int check = sumPlus + reverse(sumPlus);
    if (check == i) {
    System.out.println(String.format("n(%d)=%d,a=%d", counter,i, j));
    counter++;
    break;
    }
    }
    }
    System.out.println(String.format("%d", counter));
    }
    public static int reverse(int x) {
    String s = String.valueOf(x);
    StringBuilder sb = new StringBuilder();
    sb.append(s);
    sb.reverse();
    return Integer.parseInt(sb.toString());
    }
    public static int sumDigits(int x) {
    int result = 0;
    while (x > 0) {
    result += x % 10;
    x = x / 10;
    }
    return result;
    }
    }
  • Mathematica
    ok[n_] := Block[{s = Total@ IntegerDigits@ n}, Select[Range[0, n], s + # + FromDigits@ Reverse@ IntegerDigits[s + #] == n &, 1] != {}]; Select[ Range[0, 1000], ok] (* Giovanni Resta, Feb 19 2019 *)

Extensions

a(30)-a(55) from Giovanni Resta, Feb 19 2019
Previous Showing 41-50 of 51 results. Next