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

A229545 Numbers n such that n + (sum of digits of n) is a palindrome.

Original entry on oeis.org

0, 1, 2, 3, 4, 10, 20, 30, 40, 50, 60, 70, 80, 90, 91, 96, 100, 105, 124, 129, 143, 148, 162, 167, 181, 191, 196, 200, 205, 224, 229, 243, 248, 262, 267, 281, 291, 296, 300, 305, 324, 329, 343, 348, 362, 367, 381, 391, 396, 400, 405, 424, 429, 443, 448, 462
Offset: 1

Views

Author

Derek Orr, Sep 25 2013

Keywords

Comments

It appears the ones and tens digits in the 3-digit numbers have a pattern to them (00-->05-->24-->29-->43-->48-->62-->67-->81-->91-->96-->00).
Analyzing a(n) mod 10^e, n<100000, for e=2: starting at n=15 there are 9 cycles of length 11 [91,96,0,5,24,29,43,48,62,67,81], followed by 9 cycles of length 10 [82,0,9,18,27,36,45,54,63,72], then 9 of length 101, 9 of 102, 9 of 1011, 9 of 1012, and at least 7 of length 10103. For e=1 the cycles have the same position and length, for e>2 the shorter cycles successively disappear. [Lars Blomberg, Jan 05 2013]

Examples

			196 + (1+9+6) = 212 (a palindrome). So, 196 is in this sequence.
		

Crossrefs

Cf. A062028.

Programs

  • Mathematica
    palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; Select[Range[0, 462], palQ[# + Plus @@ IntegerDigits@ #] &] (* Michael De Vlieger, Apr 12 2015 *)
  • PARI
    for(n=0,10^3,D=digits(n+sumdigits(n));if(Vecrev(D)==D,print1(n,", "))) \\ Derek Orr, Mar 22 2015
  • Python
    def ispal(n):
      r = ''
      for i in str(n):
        r = i + r
      return n == int(r)
    def DS(n):
      s = 0
      for i in str(n):
        s += int(i)
      return s
    {print(n,end=', ') for n in range(10**3) if ispal(n+DS(n))}
    # Simplified by Derek Orr, Mar 22 2015
    

A232491 Numbers k such that 10^k is not of the form m + sum of digits of m.

Original entry on oeis.org

6, 16, 26, 36, 46, 57, 67, 77, 87, 97, 107, 116, 126, 136, 146, 157, 167, 177, 187, 197, 207, 217, 226, 236, 246, 257, 267, 277, 287, 297, 307, 317, 327, 336, 346, 357, 367, 377, 387, 397, 407, 417, 427, 437, 457, 467, 477, 487, 497, 507, 517, 527, 537, 547, 567, 577, 587, 597, 607, 617, 627, 637, 647, 658, 668, 677, 687, 697
Offset: 1

Views

Author

N. J. A. Sloane, Dec 01 2013

Keywords

References

  • M. Gardner, Time Travel and Other Mathematical Bewilderments. Freeman, NY, 1988, pp. 115-117 and 122.
  • D. R. Kaprekar, Puzzles of the Self-Numbers. 311 Devlali Camp, Devlali, India, 1959.
  • D. R. Kaprekar, The Mathematics of the New Self Numbers (Part V). 311 Devlali Camp, Devlali, India, 1967.

Crossrefs

Extensions

Terms a(3) onward from Max Alekseyev, Dec 02 2013

A108203 Numbers n put into lexicographical order which are the concatenation of k and the sum of the digits of k.

Original entry on oeis.org

11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 112, 123, 134, 145, 156, 167, 178, 189, 202, 213, 224, 235, 246, 257, 268, 279, 303, 314, 325, 336, 347, 358, 369, 404, 415, 426, 437, 448, 459, 505, 516, 527, 538, 549, 606, 617, 628, 639, 707, 718, 729, 808, 819, 909, 1001
Offset: 1

Views

Author

Keywords

Examples

			1 --> 11, 2 --> 22, 3 --> 33, ..., 9 --> 99, 10 --> 101, 11 --> 112, 12 --> 123,
..., 18 --> 189, 19 --> 1910 (ouch!), 20 --> 202, 21 --> 213, ...
		

Crossrefs

Cf. A062028, A064806. Equals A108773 sorted.

Programs

  • Mathematica
    f[n_] := FromDigits[ Join[ IntegerDigits[ n], IntegerDigits[Plus @@ IntegerDigits[ n]] ]]; t = {}; Do[t = Union[AppendTo[t, f[n]]], {n, 10^6}]

Extensions

a(55) from Rémy Sigrist, May 16 2019

A160939 a(n) = n + digital sum (n-1).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 78
Offset: 1

Views

Author

Claudio Meller, May 30 2009

Keywords

Examples

			Writing ds() for the sum of digits (A007953),
a(8) = 8 + ds(7) = 8 + 7 = 15,
a(15) = 15 + ds(14) = 15 + 5 = 20,
a(26) = 26 + ds(25) = 26 + 7 = 33.
		

Crossrefs

Programs

Formula

a(n+1) = A062028(n) + 1 for n >= 1. - Michel Marcus, Aug 02 2018

A171613 a(n) = n^2 + sum of the digits of n^2.

Original entry on oeis.org

0, 2, 8, 18, 23, 32, 45, 62, 74, 90, 101, 125, 153, 185, 212, 234, 269, 308, 333, 371, 404, 450, 500, 545, 594, 638, 695, 747, 803, 854, 909, 977, 1031, 1107, 1169, 1235, 1314, 1388, 1457, 1530, 1607, 1697, 1782, 1871, 1955, 2034, 2126, 2222, 2313, 2408, 2507
Offset: 0

Views

Author

Zak Seidov, Dec 13 2009

Keywords

Comments

Subsequence of A062028 (n + sum of the digits of n).

Crossrefs

Programs

  • Mathematica
    Table[n^2+Total[IntegerDigits[n^2]],{n,0,100}]

A171615 Numbers n with property that (n^2 + sum of the digits of n^2) is odd.

Original entry on oeis.org

4, 6, 10, 11, 12, 13, 16, 18, 19, 23, 26, 27, 28, 30, 31, 32, 33, 34, 35, 38, 40, 41, 43, 44, 48, 50, 52, 55, 56, 57, 59, 60, 62, 64, 69, 70, 71, 75, 76, 81, 82, 85, 86, 90, 94, 95, 97, 98, 99, 100, 101, 102, 103, 106, 114, 116, 118, 120, 121, 122, 123, 126, 129, 131, 135
Offset: 1

Views

Author

Zak Seidov, Dec 13 2009

Keywords

Comments

Or, n's such that A171613(n) is odd.

Crossrefs

Programs

  • Mathematica
    Drop[Union@Table[If[OddQ[n^2+Total[IntegerDigits[n^2]]],n,0],{n,0,200}],1]
    Select[Range[150],OddQ[#^2+Total[IntegerDigits[#^2]]]&] (* Harvey P. Dale, Feb 18 2015 *)

A209303 Numbers of the form x^2 + SumOfSquaredDigits(x).

Original entry on oeis.org

2, 8, 18, 32, 50, 72, 98, 101, 123, 128, 149, 162, 179, 213, 251, 293, 339, 389, 404, 443, 446, 492, 542, 596, 654, 716, 782, 852, 909, 926, 971, 1037, 1107, 1181, 1259, 1341, 1427, 1517, 1611, 1616, 1698, 1784, 1874, 1968, 2066, 2168, 2274, 2384, 2498, 2525
Offset: 1

Views

Author

Keywords

Comments

Note that early terms are not always produced in order. For example, 162 is produced by x=9, but is the 12th term in the sequence. The last out-of-order term is a(30)=926, produced when x=29.

Examples

			251 is in the sequence, because 15^2 + (1^2 + 5^2) = 251.
		

Crossrefs

Programs

  • Mathematica
    Table[n^2+Total[IntegerDigits[n]^2],{n,100}]//Union (* Harvey P. Dale, Jan 25 2021 *)
  • R
    sort((1:10000)^2+vapply(1:10000,sum(as.numeric(unlist(strsplit(as.character(as.bigz(x)),split="")))^2),1))

A230100 Numbers that can be expressed as (m + sum of digits of m) in exactly three ways.

Original entry on oeis.org

10000000000001, 10000000000003, 10000000000005, 10000000000007, 10000000000009, 10000000000011, 10000000000013, 10000000000015, 10000000000102, 10000000000104, 10000000000106, 10000000000108, 10000000000110, 10000000000112, 10000000000114, 10000000000116
Offset: 1

Views

Author

N. J. A. Sloane, Oct 12 2013 - Oct 25 2013

Keywords

Comments

Let f(n) = n + (sum of digits of n) = A062028(n).
Let g(m) = number of n such that f(n) = m (i.e. the number of inverses of m), A230093(m).
Numbers m with g(m) = 0 are called the Self or Colombian numbers, A003052.
Numbers m with g(m) = 1 give A225793.
Numbers m with g(m) = 2 give A230094.
The present sequence gives numbers m such that A230093(m) = 3.
The smallest term, a(1) = 10^13 + 1, was found by Narasinga Rao, who reports that Kaprekar verified that it is the smallest term. No details of Kaprekar's proof were given.
a(2) onwards were computed by Donovan Johnson, Oct 12 2013, and on Oct 20 2013 he completed a search of all numbers below 10^13 and verified that 10^13 + 1 is indeed the smallest term.
See A006064 for much more about this question.
Numbers m with g(m) = 4 give A377422. - Daniel Mondot, Oct 29 2024

Examples

			There are exactly three numbers, 9999999999892, 9999999999901 and 10000000000000, whose image under n->f(n) is 10000000000001, so 10^13+1 is a member of the sequence.
		

References

  • V. S. Joshi, A note on self-numbers. Volume dedicated to the memory of V. Ramaswami Aiyar. Math. Student 39 (1971), 327--328 (1972). MR0330032 (48 #8371)
  • D. R. Kaprekar, The Mathematics of the New Self Numbers, Privately printed, 311 Devlali Camp, Devlali, India, 1963.
  • Andrzej Makowski, On Kaprekar's "junction numbers", Math. Student 34 1966 77 (1967). MR0223292 (36 #6340)
  • A. Narasinga Rao, On a technique for obtaining numbers with a multiplicity of generators, Math. Student 34 1966 79--84 (1967). MR0229573 (37 #5147)

Crossrefs

A230107 Define a sequence by b(1)=n, b(k+1)=b(k)+(sum of digits of b(k)); a(n) is the number of steps needed to reach a term in A004207, or a(n) = -1 if the sequence never joins A004207.

Original entry on oeis.org

0, 0, -1, 0, 52, -1, 11, 0, -1, 51, 50, -1, 49, 10, -1, 0, 48, -1, 9, 50, -1, 49, 0, -1, 47, 48, -1, 0, 8, -1, 49, 46, -1, 47, 48, -1, 45, 0, -1, 7, 46, -1, 47, 6, -1, 45, 44, -1, 0, 46, -1, 5, 5, -1, 45, 44, -1, 43, 4, -1, 4, 0, -1, 4, 44, -1, 43, 3, -1, 0
Offset: 0

Views

Author

N. J. A. Sloane and Reinhard Zumkeller, Oct 15 2013; corrected Oct 20 2013

Keywords

Comments

Looking at b(k) mod 9 shows that a(n) = -1 whenever n is a multiple of 3 (since then the b sequence is disjoint from A004207).
Conjecture: the b sequence, for any starting value n, will eventually merge with one of A000004 (the zero sequence), A004207, A016052 or A016096.

Examples

			For n=3, A016052 never meets A004207, so a(3) = -1.
For n=5, A007618 meets A004207 at the 53rd term, 620, so a(5) = 53.
		

Crossrefs

Programs

  • Haskell
    import Data.Maybe (fromMaybe)
    a230107 = fromMaybe (-1) . f (10^5) 1 1 1 where
       f k i u j v | k <= 0    = Nothing
                   | u < v     = f (k - 1) (i + 1) (a062028 u) j v
                   | u > v     = f (k - 1) i u (j + 1) (a062028 v)
                   | otherwise = Just j
  • Maple
    read transforms; # to get digsum
    M:=2000;
    # f(s) returns the sequence k->k+digsum(k) starting at s
    f:=proc(s) global M; option remember; local n,k,s1;
    s1:=[s]; k:=s;
    for n from 1 to M do  k:=k+digsum(k);
    s1:=[op(s1),k]; od: end;
    # g(s) returns (x,p), where x = first number in common between
    # f(1) and f(s), and p is the position where it occurred.
    # If f(1), f(s) are disjoint for M terms, returns (-1,-1)
    S1:=convert(f(1),set):
    g:=proc(s) global f,S1; local t1,p,S2,S3;
    S2:=convert(f(s),set);
    S3:= S1 intersect S2;
    t1:=min(S3);
    if (t1 = infinity) then RETURN(-1,-1); else
      member(t1,f(s),'p'); RETURN(t1,p-1); fi;
    end;
    [seq(g(n)[2],n=1..20)];

A232489 Numbers k such that k + (sum of digits of k) is a power of 10.

Original entry on oeis.org

5, 86, 977, 9968, 99959, 9999950, 99999941, 999999932, 9999999923, 99999999914, 999999999896, 999999999905, 9999999999887, 99999999999878, 999999999999869, 99999999999999860, 999999999999999851, 9999999999999999842, 99999999999999999833, 999999999999999999824, 9999999999999999999815, 99999999999999999999797
Offset: 1

Views

Author

N. J. A. Sloane, Dec 01 2013

Keywords

References

  • M. Gardner, Time Travel and Other Mathematical Bewilderments. Freeman, NY, 1988, pp. 115-117 and 122.
  • D. R. Kaprekar, Puzzles of the Self-Numbers. 311 Devlali Camp, Devlali, India, 1959.
  • D. R. Kaprekar, The Mathematics of the New Self Numbers (Part V). 311 Devlali Camp, Devlali, India, 1967.

Crossrefs

Extensions

Terms a(6) onward from Max Alekseyev, Dec 02 2013
Previous Showing 41-50 of 80 results. Next