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

A197039 Numbers such that sum of the cube of decimal digits is a perfect square.

Original entry on oeis.org

1, 4, 9, 10, 12, 21, 22, 40, 48, 84, 88, 90, 100, 102, 120, 123, 126, 132, 162, 168, 186, 201, 202, 210, 213, 216, 220, 231, 261, 312, 321, 333, 400, 408, 480, 612, 618, 621, 681, 804, 808, 816, 840, 861, 880, 900, 1000, 1002, 1020, 1023, 1026, 1032, 1062
Offset: 1

Views

Author

Michel Lagneau, Oct 08 2011

Keywords

Examples

			261 is in the sequence because 2^3+6^3+1^3 = 15^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1100],IntegerQ[Sqrt[Apply[Plus,IntegerDigits[#]^3]]]&]

A197125 Numbers such that sum of digits and sum of the square of digits are both a square.

Original entry on oeis.org

1, 4, 9, 10, 40, 90, 100, 400, 900, 1000, 1111, 1177, 1224, 1242, 1339, 1393, 1422, 1717, 1771, 1933, 2124, 2142, 2214, 2241, 2412, 2421, 3139, 3193, 3319, 3391, 3913, 3931, 4000, 4122, 4212, 4221, 4444, 4588, 4669, 4696, 4858, 4885, 4966, 5488, 5848, 5884
Offset: 1

Views

Author

Michel Lagneau, Oct 10 2011

Keywords

Comments

The sequence contains a majority of numbers with two identical digits at least, but there exists a finite subset A = {1, 4, 9, 10, 40, 90, 156789, 156798, ..., 9876510} of 7!+6 = 5046 numbers with distinct decimal digits. The numbers > 90 of A are all permutations of 1567890.

Examples

			597618 is in the sequence because :
5+9+7+6+1+8 = 36 = 6^2 ;
5^2+9^2+7^2+6^2+1^2+8^2 = 256 = 16^2.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 6000 do:l:=evalf(floor(ilog10(n))+1):n0:=n:s1:=0:s2:=0:for m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10): n0:=v :s1:=s1+u:s2:=s2+u^2: od:if sqrt(s1)=floor(sqrt(s1)) and sqrt(s2)=floor(sqrt(s2)) then printf(`%d, `, n): else fi:od:
  • Mathematica
    sdQ[n_]:=Module[{idn=IntegerDigits[n]},IntegerQ[Sqrt[Total[idn]]] && IntegerQ[Sqrt[Total[idn^2]]]]; Select[Range[6000],sdQ] (* Harvey P. Dale, Oct 25 2011 *)

Formula

a(n) = {A028839} intersection {A175396}.

A223035 Prime numbers whose digits squared sum to a square.

Original entry on oeis.org

2, 3, 5, 7, 43, 263, 269, 1153, 1531, 1933, 2063, 2069, 2287, 2609, 3319, 3391, 3511, 3931, 4003, 4441, 4801, 4889, 5113, 5399, 5939, 6029, 6067, 6203, 6469, 6607, 8849, 9133, 9539, 10111, 10177, 10513, 10531, 10771, 11149, 11213, 11273, 11321, 11491, 11503
Offset: 1

Views

Author

Keywords

Examples

			269 is a prime number, and 2^2+6^2+9^2 = 121 = 11^2.
		

Crossrefs

Prime numbers from the sequence A175396.

Programs

  • Mathematica
    Select[Prime[Range[2000]], IntegerQ[Sqrt[Total[IntegerDigits[#]^2]]] &] (* T. D. Noe, Apr 05 2013 *)
  • R
    ssod<-function(i) sum(as.numeric(strsplit(as.character(i),"")[[1]])^2)
    issquare<-function(x) as.integer(sqrt(x))==sqrt(x)
    x=as.bigz(c()); i=2
    while(length(x)<10000) {if(issquare(ssod(i))) x=c(x,i); i=nextprime(i)}

A307735 Integers k such that if m = k + A003132(k) then k = m - A003132(m).

Original entry on oeis.org

0, 9, 205, 212, 217, 366, 457, 663, 1314, 1315, 1348, 1672, 1742, 1792, 1797, 2005, 2012, 2017, 2129, 2201, 2208, 2213, 2216, 2305, 2404, 2405, 2465, 2564, 2565, 2671, 2741, 2748, 2789, 2829, 3114, 3115, 3205, 3303, 3306, 3394, 3436, 3475, 3696, 3819, 4204, 4205, 4245, 4347, 4475, 4542, 4629, 4647, 4688
Offset: 1

Views

Author

Antonio Roldán, Apr 25 2019

Keywords

Comments

A003132(n) is the sum of the squares of the digits of n.

Examples

			205 is in the sequence because 205 + 2^2 + 0^2 + 5^2 = 234 and 234 - 2^2 - 3^2 - 4^2 = 205.
		

Crossrefs

Programs

  • Mathematica
    sod2[n_] := Total @ (IntegerDigits[n]^2); aQ[n_] := sod2[n + (s=sod2[n])] == s; Select[Range[0, 4700], aQ] (* Amiram Eldar, Jul 03 2019 *)
  • PARI
    for(i = 0 , 5000 , a = i + norml2(digits(i)) ; b = a - norml2(digits(a)) ; if(i == b , print1(i , ", ")))

A197129 Numbers such that the sum, sum of the squares, and sum of the cubes of the decimal digits are each a perfect square.

Original entry on oeis.org

1, 4, 9, 10, 40, 90, 100, 400, 900, 1000, 1111, 1224, 1242, 1339, 1393, 1422, 1933, 2124, 2142, 2214, 2241, 2412, 2421, 3139, 3193, 3319, 3391, 3913, 3931, 4000, 4122, 4212, 4221, 4444, 4669, 4696, 4966, 6469, 6496, 6649, 6694, 6946, 6964, 9000, 9133, 9313
Offset: 1

Views

Author

Michel Lagneau, Oct 10 2011

Keywords

Comments

Each number > 90 contains at least two identical digits because the sequence A197125 contains a subset of numbers all of whose digits are distinct and are all the permutations of 1567890. But 1^3 + 5^3 + 6^3 + 7^3 + 8^3 + 9^3 = 1926 is not square. Consequently, it is impossible to find numbers > 90 with distinct digits in this sequence.

Examples

			4669 is in the sequence because:
4   + 6   + 6   + 9   = 25   = 5^2;
4^2 + 6^2 + 6^2 + 9^2 = 169  = 13^2;
4^3 + 6^3 + 6^3 + 9^3 = 1225 = 35^2.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 10000 do:l:=evalf(floor(ilog10(n))+1):n0:=n:s1:=0:s2:=0:s3:=0:for m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10): n0:=v :s1:=s1+u:s2:=s2+u^2:s3:=s3+u^3:od:if sqrt(s1)=floor(sqrt(s1)) and sqrt(s2)=floor(sqrt(s2)) and sqrt(s3)=floor(sqrt(s3))then printf(`%d, `, n): else fi:od:
  • Mathematica
    sdQ[n_]:=Module[{idn=IntegerDigits[n]},IntegerQ[Sqrt[Total[idn]]] && IntegerQ[Sqrt[Total[idn^2]]]&&IntegerQ[Sqrt[Total[idn^3]]]]; Select[ Range[ 10000],sdQ] (* Harvey P. Dale, Oct 25 2011 *)
    psQ[n_]:=With[{idn=IntegerDigits[n]},AllTrue[{Sqrt[Total[idn]],Sqrt[Total[idn^2]],Sqrt[Total[idn^3]]},IntegerQ]]; Select[Range[10000],psQ] (* Harvey P. Dale, Nov 17 2024 *)
  • PARI
    is(n)=my(v=eval(Vec(Str(n))));issquare(sum(i=1,#v,v[i]))&&issquare(sum(i=1,#v,v[i]^2))&&issquare(sum(i=1,#v,v[i]^3)) \\ Charles R Greathouse IV, Oct 10 2011

Formula

A028839 INTERSECT A175396 INTERSECT A197039.

A171976 Numbers n such that the sum of the squares of the digits of n^n is a square.

Original entry on oeis.org

0, 1, 2, 8, 10, 100, 123, 209, 312, 1000, 1668, 2191, 2268, 4767, 9338, 10000, 11004, 12248, 12322, 15926, 17951, 18202, 19764, 21807, 29509, 42647, 43072, 44750, 54237, 56634, 70383, 74032, 85325, 90906, 95261, 100000
Offset: 1

Views

Author

Michel Lagneau, Nov 19 2010

Keywords

Examples

			8 is in the sequence because 8^8 = 16777216 and 1^2+6^2+7^2+7^2+7^2+2^2+1^2+6^2
  = 225 = 15^2.
		

Programs

  • Maple
    with(numtheory): digits:=200:nn:=5000:for n from 0 to nn do:l:=length(n^n):n0:=n^n:s:=0:for
      m from 1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v :s:=s+u^2:od:if sqrt(s)=
      floor(sqrt(s))then printf(`%d, `, n):else fi:od:
  • Mathematica
    Join[{0},Select[Range[100000],IntegerQ[Sqrt[Total[IntegerDigits[ #^#]^2]]]&]] (* Harvey P. Dale, Sep 25 2018 *)
  • PARI
    isok(n) = my(d = digits(n^n)); issquare (sum(i=1, #d, d[i]^2)); \\ Michel Marcus, Jan 15 2014

Formula

{n: A003132(n^n) in A000290}.
{n: n^n in A175396.}

Extensions

Edited by D. S. McNeil, Nov 19 2010
Offset corrected and more terms added, Michel Marcus, Jan 15 2014
Showing 1-6 of 6 results.