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

A153752 Numbers k such that there are 16 digits in k^2 and for each factor f of 16 (1,2,4,8) the sum of digit groupings of size f is a square.

Original entry on oeis.org

31883334, 31886667, 31956690, 31970049, 32469999, 33338100, 33341067, 33870000, 34140000, 34149999, 34713042, 34763334, 34856667, 35780000, 36356249, 36356480, 36359065, 37523635, 37737452, 37949451, 38362409
Offset: 1

Views

Author

Doug Bell, Dec 31 2008

Keywords

Comments

This sequence is a subsequence of both A153745 and A061910.
This sequence contains 124 terms, with a(124) = 9998956. - Giovanni Resta, Jun 06 2015

Examples

			31883334^2 = 1016546986955556;
1+0+1+6+5+4+6+9+8+6+9+5+5+5+5+6 = 81 = 9^2;
10+16+54+69+86+95+55+56 = 441 = 21^2;
1016+5469+8695+5556 = 20736 = 144^2;
10165469+86955556 = 97121025 = 9855^2.
		

Crossrefs

Programs

  • Mathematica
    okQ[n_]:=Module[{n2=IntegerDigits[n^2]},And@@(IntegerQ[Sqrt[ #]]&/@ (Total/@(Table[ FromDigits/@Partition[n2,2^i],{i,0,3}])))]; Select[ Range[31622777,38400000],okQ] (* Harvey P. Dale, Aug 12 2012 *)

A164818 Integer average digit of squares.

Original entry on oeis.org

1, 4, 9, 5, 3, 3, 3, 3, 6, 6, 3, 4, 4, 4, 4, 4, 4, 5, 5, 2, 2, 5, 5, 5, 5, 2, 5, 2, 5, 5, 5, 5, 5, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 6, 3, 6, 3, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 3, 6, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 6, 6, 6, 6, 3, 3, 3, 6, 3, 3, 3, 3, 6, 6, 3, 6
Offset: 1

Views

Author

Zak Seidov, Aug 27 2009

Keywords

Comments

a(n)= average digit of squares of A164817(n).
The only n for which a(n) = 9 is 3. a(44) = a(26165) = 8. - Robert Israel, Feb 24 2016

Crossrefs

Programs

  • Maple
    f:= proc(n) local L,r;
    L:= convert(n^2,base,10);
    r:= convert(L,`+`)/nops(L);
    if r::integer then r else NULL fi
    end proc:
    map(f, [$1..1000]); # Robert Israel, Feb 24 2016

A262712 Numbers k such that sum of digits of k^2 is 9.

Original entry on oeis.org

3, 6, 9, 12, 15, 18, 21, 30, 39, 45, 48, 51, 60, 90, 102, 105, 111, 120, 150, 180, 201, 210, 249, 300, 318, 321, 348, 351, 390, 450, 480, 501, 510, 549, 600, 900, 1002, 1005, 1011, 1020, 1050, 1101, 1110, 1149, 1200, 1500, 1761, 1800, 2001, 2010, 2100, 2490
Offset: 1

Views

Author

Vincenzo Librandi, Sep 28 2015

Keywords

Comments

Subsequence of A008585.

Examples

			6 is in sequence because 6^2 = 36 and 3+6 = 9.
		

Crossrefs

Cf. similar sequences listed in A262711.

Programs

  • Magma
    [n: n in [1..2*10^4] | &+Intseq(n^2) eq 9 ];
    
  • Maple
    filter:= proc(n) convert(convert(n^2,base,10),`+`) = 9 end proc:select(filter, [$1..10^5]); # Robert Israel, Jan 04 2024
  • Mathematica
    Select[Range[10^5], Total[IntegerDigits[#^2]] == 9 &]
  • PARI
    for(n=1, 1e8, if (sumdigits(n^2) == 9, print1(n", "))) \\ Altug Alkan, Sep 28 2015

A262713 Numbers k such that the sum of digits of k^2 is 10.

Original entry on oeis.org

8, 19, 35, 46, 55, 71, 80, 145, 152, 179, 190, 251, 332, 350, 361, 449, 451, 460, 548, 550, 649, 710, 800, 1450, 1520, 1790, 1900, 2510, 3320, 3500, 3610, 4490, 4499, 4510, 4600, 5480, 5500, 6490, 7100, 8000, 14500, 15200, 17900, 19000, 20249, 20251, 24499
Offset: 1

Views

Author

Vincenzo Librandi, Sep 28 2015

Keywords

Comments

From Altug Alkan, Sep 29 2015: (Start)
Subsequence of A001651.
If a(n)+1 mod 9 != 0 then a(n)-1 mod 9 = 0;
if a(n)-1 mod 9 != 0 then a(n)+1 mod 9 = 0;
a(n)^2 - 1 mod 9 = 0. (End)
A135027(n)*10^k is a term for all n > 0, k >= 0. - Michael S. Branicky, Aug 19 2021

Examples

			19 is in sequence because 19^2 = 361 and 3+6+1 = 10.
		

Crossrefs

Cf. similar sequences listed in A262711.

Programs

  • Magma
    [n: n in [1..3*10^4] | &+Intseq(n^2) eq 10 ];
    
  • Mathematica
    Select[Range[10^5], Total[IntegerDigits[#^2]] == 10 &]
  • PARI
    for(n=1, 1e6, if (sumdigits(n^2) == 10, print1(n", "))) \\ Altug Alkan, Sep 28 2015
    
  • Python
    # See linked program to go to larger numbers
    def ok(n): return sum(map(int, str(n*n))) == 10
    print(list(filter(ok, range(25000)))) # Michael S. Branicky, Aug 19 2021

A268227 a(n) = sum of digits of (2n)^2.

Original entry on oeis.org

0, 4, 7, 9, 10, 1, 9, 16, 13, 9, 4, 16, 18, 19, 19, 9, 7, 13, 18, 13, 7, 18, 19, 10, 9, 7, 13, 18, 13, 16, 9, 19, 19, 18, 16, 13, 18, 22, 25, 18, 10, 19, 18, 25, 22, 9, 22, 25, 18, 19, 1, 9, 16, 13, 18, 4, 16, 27, 19, 19, 9, 25, 22, 27, 22, 16, 18, 28, 28, 18, 16, 13, 18, 13, 16, 9, 10, 19, 18
Offset: 0

Views

Author

N. J. A. Sloane, Jan 31 2016

Keywords

Crossrefs

Bisection of A004159. Cf. A268228.

Programs

  • Mathematica
    Total[IntegerDigits[#]]&/@((2*Range[0,80])^2) (* Harvey P. Dale, Sep 14 2016 *)
  • PARI
    a(n) = sumdigits((2*n)^2); \\ Michel Marcus, Jul 23 2016

A268228 a(n) = sum of digits of (2n + 1)^2.

Original entry on oeis.org

1, 9, 7, 13, 9, 4, 16, 9, 19, 10, 9, 16, 13, 18, 13, 16, 18, 10, 19, 9, 16, 22, 9, 13, 7, 9, 19, 10, 18, 16, 13, 27, 13, 25, 18, 10, 19, 18, 25, 13, 18, 31, 16, 27, 19, 19, 27, 16, 22, 18, 4, 16, 9, 19, 19, 9, 25, 13, 27, 13, 16, 18, 19, 19, 18, 16, 31, 18, 31, 16, 27, 19, 10, 18, 7, 13, 18
Offset: 0

Views

Author

N. J. A. Sloane, Jan 31 2016

Keywords

Crossrefs

Bisection of A004159. Cf. A007953, A016754, A268227.

Programs

  • Magma
    [&+Intseq((2*n+1)^2): n in [0..87] ]; // Vincenzo Librandi, Jul 23 2016
  • Maple
    f:= n -> convert(convert((2*n+1)^2,base,10),`+`):
    map(f, [$0..100]); # Robert Israel, Apr 26 2020
  • Mathematica
    Table[Sum[DigitCount[(2 n + 1)^2] [[i]] i, {i, 9}], {n, 0, 70}] (* Vincenzo Librandi, Jul 23 2016, after G. C. Greubel *)
  • PARI
    a(n) = sumdigits((2*n+1)^2); \\ Michel Marcus, Jul 23 2016
    

Formula

a(n) = A007953(A016754(n)). - Michel Marcus, Oct 13 2017

A360803 Numbers whose squares have a digit average of 8 or more.

Original entry on oeis.org

3, 313, 94863, 298327, 987917, 3162083, 9893887, 29983327, 99477133, 99483667, 197483417, 282753937, 314623583, 315432874, 706399164, 773303937, 894303633, 947047833, 948675387, 989938887, 994927133, 994987437, 998398167, 2428989417, 2754991833, 2983284917, 2999833327
Offset: 1

Views

Author

Dmitry Kamenetsky, Feb 21 2023

Keywords

Comments

This sequence is infinite. For example, numbers floor(30*100^k - (5/3)*10^k) beginning with 2 followed by k 9s, followed by 8 and k 3s, have a square whose digit average converges to (but never equals) 8.25. [Corrected and formula added by M. F. Hasler, Apr 11 2023]
Only a few examples are known whose square has a digit average of 8.25 and above: 3^2 = 9, 707106074079263583^2 = 499998999999788997978888999589997889 (digit average 8.25), 94180040294109027313^2 = 8869879989799999999898984986998979999969 (digit average 8.275).
This is the union of A164772 (digit average = 8) and A164841 (digit average > 8). - M. F. Hasler, Apr 11 2023

Examples

			94863 is in the sequence, because 94863^2 = 8998988769, which has a digit average of 8.1 >= 8.
		

Crossrefs

Cf. A164772 (digit average = 8), A164841 (digit average > 8).

Programs

  • PARI
    isok(k) = my(d=digits(k^2)); vecsum(d)/#d >= 8; \\ Michel Marcus, Feb 22 2023
    
  • Python
    def ok(n): d = list(map(int, str(n**2))); return sum(d) >= 8*len(d)
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Feb 22 2023

A369955 a(n) is the least integer m such that the sum of the digits of m^2 is 9*(k+n) where k is the number of digits of m.

Original entry on oeis.org

3, 63, 3114, 8937, 94863, 5477133, 82395381, 706399164, 9380293167, 99497231067, 4472135831667, 62441868958167, 836594274358167, 9983486364492063, 435866837461509417, 707106074079263583, 77453069648658793167, 754718284918279954614, 8882505274864168010583
Offset: 0

Views

Author

Zhining Yang, Feb 06 2024

Keywords

Comments

3|a(n).

Examples

			a(2)=3114 because 3114 is the least 4-digit integer whose square has digit sum 9*(4+2) = 9*6 = 54: 3114^2 = 9696996 and 9+6+9+6+9+9+6 = 54.
		

Crossrefs

Programs

  • Mathematica
    n=0;For[k=0,k<10^8/3,k++,If[Total[IntegerDigits[9k^2]]==9*(n+Ceiling@Log10@(3k)),Print[{n,3k}];n++]]
  • PARI
    a(n) = my(m=1); while (sumdigits(m^2) != 9*(#Str(m)+n), m++); m; \\ Michel Marcus, Feb 10 2024
  • Python
    def sd(n):
        return sum(int(d) for d in str(n*n))
    n=0
    for k in range(0,10**8,3):
        if sd(k)==9*(len(str(k))+n):
            print([n,k])
            n+=1
    

Extensions

a(9)-a(18) from Zhao Hui Du, Feb 19 2024

A384094 Numbers whose square has digit sum 9 and no trailing zero.

Original entry on oeis.org

3, 6, 9, 12, 15, 18, 21, 39, 45, 48, 51, 102, 105, 111, 201, 249, 318, 321, 348, 351, 501, 549, 1002, 1005, 1011, 1101, 1149, 1761, 2001, 4899, 5001, 10002, 10005, 10011, 10101, 10149, 11001, 14499, 20001, 50001, 100002, 100005, 100011, 100101, 101001, 110001, 200001, 375501, 500001, 1000002
Offset: 1

Views

Author

M. F. Hasler, Jun 15 2025

Keywords

Comments

All numbers of the form 10^a + 10^b + 1 (i.e., A052216+1 = 3*A237424) and of the form 10^a + 5*10^b with min(a, b) = 0 (i.e., A133472 U A199685), are in this sequence. Terms not of this form are (9, 18, 39, 45, 48, 249, 318, 321, 348, 351, 549, 1149, 1761, 4899, 10149, 14499, 375501, ...), see subsequence A384095. (Is this sequence finite? What is the next term?)
Is it true that no number > 1049 = A215614(6) has a square with digit sum less than 9, other than the trivial 1 and 4?

Crossrefs

Cf. A004159 (sum of digits of n^2), A215614 (sumdigits(n^2) = 7), A133472 (10^n + 5), A199685 (5*10^n + 1), A052216 (10^a + 10^b), A237424 ((10^a + 10^b + 1)/3).
See also: A058414 (digits(n^2) in {0,1,4}).

Programs

  • PARI
    select( {is_A384094(n)=n%10 && sumdigits(n^2)==9}, [1..10^5])

A384095 Numbers other than {10^a + 10^b + 1} and {10^a + 5*10^b, min(a, b) = 0} whose square has digit sum 9 and no trailing zero.

Original entry on oeis.org

9, 18, 39, 45, 48, 249, 318, 321, 348, 351, 549, 1149, 1761, 4899, 10149, 14499, 375501
Offset: 1

Views

Author

M. F. Hasler, Jun 15 2025

Keywords

Comments

The definition excludes the two "regular" subsequences of A384094, namely A052216+1 = 3*A237424 and A133472 U A199685, which provide most of its terms.
Is it true that no number > 1049 = A215614(6) has a square with digit sum less than 9, other than the trivial 1 and 4?
The next term, if it exists, is a(18) > 10^8.
a(18) > 10^14 if it exists. - Robert Israel, Jun 15 2025
a(18) > 10^40 if it exists. - Chai Wah Wu, Jun 19 2025

Crossrefs

Cf. A004159 (sum of digits of n^2), A384094 (sumdigits(n^2) = 9), A133472 (10^n+5), A199685 (5*10^n + 1), A052216 (10^a+10^b), A237424 ((10^a+10^b+1)/3).
See also: A215614 (sumdigits(n^2) = 7), A058414 (digits(n²) ⊂ {0,1,4}).

Programs

  • Maple
    extend:= proc(a,d) local i,s;
        s:= convert(convert(a,base,10),`+`);
        op(select(t -> numtheory:-quadres(t,10^d)=1, [seq(i*10^(d-1)+a, i=0 .. 9 - s)]))
    end proc:
    istriv:= proc(n) local L;
       L:= subs(0=NULL,convert(n,base,10));
       member(L, [[4],[5],[6],[1,1],[1,1,1],[1,2],[2,1],[1,5],[5,1]])
    end proc:
    R:= NULL:
    A:= [1,4,5,6,9]:
    for d from 2 to 20 do
      A:= map(extend,A,d);
      V:= select(t -> t > 10^(d-1) and issqr(t) and convert(convert(t,base,10),`+`)=9, A);
      if V <> [] then V:= sort(remove(istriv,map(sqrt,V))); R:= R,op(V); fi
    od:
    R;# Robert Israel, Jun 15 2025
  • PARI
    select( {is_A384095(n)=n%10 && sumdigits(n^2)==9 && !bittest(36938, fromdigits(Set(digits(n))))}, [1..10^5])
Previous Showing 41-50 of 71 results. Next