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

A061910 Positive numbers k such that sum of digits of k^2 is a square.

Original entry on oeis.org

1, 2, 3, 6, 9, 10, 11, 12, 13, 14, 15, 18, 20, 21, 22, 23, 30, 31, 39, 41, 45, 48, 51, 58, 59, 60, 67, 68, 76, 77, 85, 86, 90, 94, 95, 100, 101, 102, 103, 104, 105, 110, 111, 112, 113, 120, 121, 122, 130, 131, 139, 140, 148, 150, 157, 158, 166, 175, 176, 180, 184, 185
Offset: 1

Views

Author

Asher Auel, May 17 2001

Keywords

Examples

			6^2 = 36 and 3+6 = 9 is a square. 13^2 = 169 and 1+6+9 = 16 is a square.
		

Crossrefs

Sequence A293832 gives the start of the first run of n consecutive values.

Programs

  • Magma
    [ n: n in [1..185] | IsSquare(&+Intseq(n^2)) ];  // Bruno Berselli, Jul 29 2011
    
  • Maple
    readlib(issqr): f := []: for n from 1 to 200 do if issqr(convert(convert(n^2,base,10),`+`)) then f := [op(f), n] fi; od; f;
  • Mathematica
    Select[Range[185], IntegerQ[Sqrt[Total[IntegerDigits[#^2]]]] &] (* Jayanta Basu, May 06 2013 *)
  • PARI
    is(n)=n=eval(Vec(Str(n^2)));issquare(sum(i=1,#n,n[i])) \\ Charles R Greathouse IV, Jul 29 2011
    
  • PARI
    select( is_A061910(n)=issquare(sumdigits(n^2)), [0..199]) \\ Includes the initial 0. - M. F. Hasler, Oct 16 2017
    
  • Python
    from gmpy2 import is_square
    A061910 = [n for n in range(1,10**3) if is_square(sum(int(d) for d in str(n*n)))] # Chai Wah Wu, Sep 03 2014

A068833 Start of the first occurrence of exactly n consecutive squares with digit sum also a square.

Original entry on oeis.org

16, 36, 900, 3364, 0, 123409881, 10000, 81, 2120219933855716, 91361386718598177458046950625
Offset: 0

Views

Author

Amarnath Murthy, Mar 09 2002

Keywords

Examples

			a(7) = 81 as the sums of the digits of the 7 consecutive squares 81, 100, 121, 144, 169, 196, 225 are squares, but the digit sums of 64 and 256 are not.
		

Crossrefs

Programs

  • Mathematica
    l[n_] := Module[{k}, For[k=0, IntegerQ[Sqrt[Plus@@IntegerDigits[(n+k)^2]]], k++, Null]; k]; Clear[a]; For[n=0, True, n+=ln+1, If[a[ln=l[n]]==-1, Null, Null, a[ln]=n; Print["a(", ln, ")=", n^2]]]

Extensions

Edited by Dean Hickerson, Oct 28 2002
a(9) from Giovanni Resta, Aug 27 2018
Showing 1-2 of 2 results.