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-3 of 3 results.

A058369 Numbers k such that k and k^2 have same digit sum.

Original entry on oeis.org

0, 1, 9, 10, 18, 19, 45, 46, 55, 90, 99, 100, 145, 180, 189, 190, 198, 199, 289, 351, 361, 369, 379, 388, 450, 451, 459, 460, 468, 495, 496, 550, 558, 559, 568, 585, 595, 639, 729, 739, 775, 838, 855, 900, 954, 955, 990, 999, 1000, 1098, 1099, 1179, 1188, 1189
Offset: 1

Views

Author

G. L. Honaker, Jr., Dec 17 2000

Keywords

Comments

It is interesting that the graph of this sequence appears almost identical as the maximum value of n increases by factors of 10. Compare the graph of the b-file (having numbers up to 10^6) with the plot of the terms up to 10^8. - T. D. Noe, Apr 28 2012
If iterated digit sum (A010888, A056992) is used instead of just digit sum (A007953, A004159), we get A090570 of which this sequence is a subset. - Jeppe Stig Nielsen, Feb 18 2015
Hare, Laishram, & Stoll show that this sequence (indeed, even its subsequence A254066) is infinite. In particular for each k in {846, 847, 855, 856, 864, 865, 873, ...} there are infinitely many terms in this sequence not divisible by 10 that have digit sum k. - Charles R Greathouse IV, Aug 25 2015
There are infinitely many n such that both n and n+1 are in the sequence. This includes A002283. - Robert Israel, Aug 26 2015

Examples

			Digit sum of 9 = 9 9^2 = 81, 8+1 = 9 digit sum of 145 = 1+4+5 = 10 145^2 = 21025, 2+1+0+2+5 = 10 digit sum of 954 = 9+5+4 = 18 954^2 = 910116, 9+1+0+1+1+6 = 18. - Florian Roeseler (hazz_dollazz(AT)web.de), May 03 2010
		

Crossrefs

Cf. A147523 (number of numbers in each decade).
Subsequence of A090570.

Programs

  • Haskell
    import Data.List (elemIndices)
    import Data.Function (on)
    a058369 n = a058369_list !! (n-1)
    a058369_list =
       elemIndices 0 $ zipWith ((-) `on` a007953) [0..] a000290_list
    -- Reinhard Zumkeller, Aug 17 2011
    
  • Magma
    [n: n in [0..1200] |(&+Intseq(n)) eq (&+Intseq(n^2))]; // Vincenzo Librandi, Aug 26 2015
    
  • Maple
    sd := proc (n) options operator, arrow: add(convert(n, base, 10)[j], j = 1 .. nops(convert(n, base, 10))) end proc: a := proc (n) if sd(n) = sd(n^2) then n else end if end proc; seq(a(n), n = 0 .. 1400); # Emeric Deutsch, May 11 2010
    select(t -> convert(convert(t,base,10),`+`)=convert(convert(t^2,base,10),`+`),
    [seq(seq(9*i+j,j=0..1),i=0..1000)]); # Robert Israel, Aug 26 2015
  • Mathematica
    Select[Range[0,1200],Total[IntegerDigits[#]]==Total[IntegerDigits[ #^2]]&] (* Harvey P. Dale, Jun 14 2011 *)
  • PARI
    is(n)=sumdigits(n)==sumdigits(n^2) \\ Charles R Greathouse IV, Aug 25 2015
    
  • Python
    def ds(n): return sum(map(int, str(n)))
    def ok(n): return ds(n) == ds(n**2)
    def aupto(nn): return [m for m in range(nn+1) if ok(m)]
    print(aupto(1189)) # Michael S. Branicky, Jan 09 2021

Formula

A007953(a(n)) = A004159(a(n)). - Reinhard Zumkeller, Apr 25 2009

Extensions

Edited by N. J. A. Sloane, May 30 2010

A028553 Numbers k such that k*(k+3) is a palindrome.

Original entry on oeis.org

0, 1, 8, 28, 66, 88, 211, 298, 671, 2126, 2998, 28814, 29369, 29998, 63701, 212206, 212671, 299998, 636776, 2122206, 2861419, 2999998, 9443423, 21341691, 28862883, 29999998, 212325206, 289053683, 294127328, 294174669, 299999998, 2134473706, 2946920844, 2999999998
Offset: 1

Views

Author

Keywords

Comments

Also: numbers k such that the sum of the first k even composites is palindromic. Sequence is 4 + 6 + 8 + 10 + 12 + 14 + ... + z. For values of z see A058851. (Comment added by author 12/2000.)
All numbers of the form 3*10^j - 2 for j >= 0 are terms. For n > 1, a(n) mod 10 is one of {1,3,4,6,8,9}. - Chai Wah Wu, Feb 20 2021

Crossrefs

Programs

  • Mathematica
    (Sqrt[4#+9]-3)/2&/@Select[Table[k(k+3),{k,0,3*10^6}],PalindromeQ] (* The program generates the first 22 terms of the sequence. *) (* Harvey P. Dale, Oct 03 2023 *)
  • Python
    n, m, A028553_list = 0, 0, []
    while n < 10**12:
        s = str(m)
        if s == s[::-1]:
            A028553_list.append(n)
        m += 2*(n+2)
        n += 1 # Chai Wah Wu, Feb 20 2021

Extensions

More terms from Chai Wah Wu, Feb 20 2021

A058370 Primes p such that p and p^2 have same digit sum.

Original entry on oeis.org

19, 199, 379, 739, 1747, 1999, 3169, 3259, 4519, 4789, 4951, 5689, 5851, 5869, 6481, 6679, 7489, 8389, 9199, 10729, 12799, 12889, 13789, 14149, 14851, 14869, 15679, 17389, 17497, 17659, 17929, 22699, 26479, 26497, 26839, 28297, 28549, 29179
Offset: 1

Views

Author

G. L. Honaker, Jr., Dec 17 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[3300]],Total[IntegerDigits[#]]==Total[IntegerDigits[ #^2]]&] (* Harvey P. Dale, May 08 2011 *)
Showing 1-3 of 3 results.