[go: up one dir, main page]

login
Search: a003132 -id:a003132
     Sort: relevance | references | number | modified | created      Format: long | short | data
Sum of squares of digits of prime factors of n, with multiplicity.
+10
0
0, 4, 9, 8, 25, 13, 49, 12, 18, 29, 2, 17, 10, 53, 34, 16, 50, 22, 82, 33, 58, 6, 13, 21, 50, 14, 27, 57, 85, 38, 10, 20, 11, 54, 74, 26, 58, 86, 19, 37, 17, 62, 25, 10, 43, 17, 65, 25, 98, 54, 59, 18, 34, 31, 27, 61, 91, 89, 106, 42
OFFSET
1,2
COMMENTS
Differs from A067666 if any prime factor exceeds 1 digit. Fixed points include 16, 27. See also: A067666 Sum of squares of prime factors of n (counted with multiplicity). See also: A003132 Sum of squares of digits of n. See also: A118503 Sum of digits of prime factors of n, with multiplicity.
FORMULA
a(n) = SUM[i=1..k] (e_i)*A003132(p_i) where prime decomposition of n = (p_1)^(e_1) * (p_2)^(e_2) * ... * (p_k)^(e_k).
EXAMPLE
a(22) = 6 because 22 = 2 * 11 and the sum of squares of digits of prime factors is 2^2 + 1^2 + 1^2.
a(121) = 4 because 121 = 11^2 = 11 * 11, so 1^2 + 1^2 + 1^2 + 1^2 = 4.
MATHEMATICA
Join[{0}, Table[Total[Flatten[IntegerDigits/@(Flatten[Table[#[[1]], #[[2]]]&/@ FactorInteger[ n]])]^2], {n, 2, 60}]] (* Harvey P. Dale, Nov 17 2022 *)
KEYWORD
base,easy,nonn
AUTHOR
Jonathan Vos Post, May 07 2006
EXTENSIONS
a(0) removed by Andrey Zabolotskiy, Jun 08 2024
STATUS
approved
Numbers n such that the sum of the squares of the digits of n^n is a square.
+10
0
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,3
FORMULA
{n: A003132(n^n) in A000290}.
{n: n^n in A175396.}
EXAMPLE
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.
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 *)
PROG
(PARI) isok(n) = my(d = digits(n^n)); issquare (sum(i=1, #d, d[i]^2)); \\ Michel Marcus, Jan 15 2014
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Nov 19 2010
EXTENSIONS
Edited by D. S. McNeil, Nov 19 2010
Offset corrected and more terms added, Michel Marcus, Jan 15 2014
STATUS
approved
Smallest prime p such that the sum of the squares of the digits of p equals n (or 0 if no such prime exists).
+10
0
0, 11, 0, 2, 101111, 211, 2111, 101111111, 3, 13, 113, 112121, 23, 21221, 1123, 11213, 41, 1223, 313, 10133, 241, 233, 112223, 21313, 5, 431, 151, 1151, 13313, 251, 2333, 11251, 2243, 53, 1433, 1153, 61, 523, 1523, 11161, 443, 541, 353, 33413, 2621, 163, 1163, 13523, 7, 17
OFFSET
1,2
COMMENTS
a(3) = 0 because the numbers of the form 10..010..01 are divisible by 3. Conjecture : except for the numbers 1 and 3, for every possible square digit sum there exists a prime.
EXAMPLE
a(13) = 23 because 2^2 + 3^2 = 13, and 23 is the least such prime.
MAPLE
with(numtheory):for k from 2 to 100 do: id:=0:for p from 1 to 100000 while(id=0)
do:n:=ithprime(p):l:=length(n):n0:=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 s=k then id:=1:printf(`%d, `, n):else fi:od:od:
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Mar 26 2011
STATUS
approved
Primes prime(k) such that the sum of the squares of digits of prime(k) equals the sum of the squares of digits of k.
+10
0
449, 2141, 2213, 3137, 4339, 4349, 4421, 5701, 9623, 13093, 14653, 16447, 16567, 22901, 27091, 36061, 41491, 45403, 45413, 45433, 50417, 52691, 54631, 54941, 55049, 56963, 57089, 58943, 60601, 61043, 61051, 63607, 65831, 66301, 67843, 68543, 72019, 73421
OFFSET
1,1
EXAMPLE
449 is the 87th prime and sum of the squares of digits of both is 113;
56963 is the 5778th prime and sum of the squares of digits of both is 187.
MATHEMATICA
Prime[Select[Range[10000], Apply[Plus, IntegerDigits[#]^2] == Apply[Plus, IntegerDigits[Prime[#]]^2] &]]
CROSSREFS
Cf. A003132.
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Jul 19 2011
STATUS
approved
Primes such that the sum of the squares of their digits equals the number of their digits.
+10
0
11, 102001, 1000121, 1000211, 1002101, 1010201, 1020011, 1020101, 1021001, 1102001, 1120001, 1201001, 2001101, 2100011, 2110001, 100012111, 100101121, 100110121, 100112101, 100121011, 100211101, 101020111, 101100211, 101102101, 101110201, 101210101, 102100111
OFFSET
1,1
COMMENTS
A subsequence of 1, 11, 111, 1111, 2000, 10002, 10020, 10200, 11111,... which contains n such that A003132(n) = A055642(n). - R. J. Mathar, Nov 07 2011
EXAMPLE
a(2) = 102001 is in the sequence because 1^2+0^2+2^2+0^2+0^2+1^2 = 6 = length(a(2)).
MATHEMATICA
fQ[n_] := Plus @@ (IntegerDigits[n]^2) == IntegerLength[n]; Select[Prime[Range[100000000]], fQ] (* Robert G. Wilson v, Nov 07 2011 *)
CROSSREFS
Cf. A069710.
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Nov 03 2011
STATUS
approved
Sum of the 16th powers of the decimal digits of n.
+10
0
0, 1, 65536, 43046721, 4294967296, 152587890625, 2821109907456, 33232930569601, 281474976710656, 1853020188851841, 1, 2, 65537, 43046722, 4294967297, 152587890626, 2821109907457, 33232930569602, 281474976710657, 1853020188851842, 65536, 65537, 131072, 43112257
OFFSET
0,3
COMMENTS
This is to exponent 16 as A007953 is to exponent 1, A003132 is to exponent 2, and A055013 is to exponent 4.
EXAMPLE
a(14) = 1^16 + 4^16 = 4294967297 = 641 * 6700417.
PROG
(PARI) a(n)=my(s); while(n, s+=(n%10)^16; n\=10); s \\ Charles R Greathouse IV, May 11 2012
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Jonathan Vos Post, May 11 2012
STATUS
approved
Numbers n such that sum of digits of n equals the least prime dividing n and sum of squares of digits of n equals the greatest prime dividing n.
+10
0
133, 803, 2023, 106811, 383177, 1071949, 1342027, 2025343, 2569757, 2911123, 3341831, 3993883, 6285901, 10860071, 11194319, 13270013, 21736109, 21871477, 22159451, 22421587, 26011229, 27600257, 31174391, 32656681, 34880611, 40435193, 41755573, 53738911
OFFSET
1,1
FORMULA
k such that A020639(k) = A007953(k) and A006530(k) = A003132(k).
EXAMPLE
383177 = 29 * 73 * 181 is in the sequence because 29 = 3+8+3+1+7+7 and 181 = 3^2+8^2+3^2+1^2+7^2+7^2.
MAPLE
with(numtheory):A:= proc(n) add(u, u=convert(n, base, 10)) ; end proc: B:= proc(m) add(v^2, v=convert(m, base, 10)) ; end proc: for i from 2 to 1000000 do:x:=factorset(i):n1:=nops(x):if x[1]=A(i) and x[n1]=B(i) then print(i):else fi:od:
PROG
(PARI) is_A217690(n)={my(d=digits(n), s=norml2(d), f); (n%s || !isprime(s) || n%(d=sum(i=1, #d, d[i])) || !isprime(d)) & return; !(f=factor(n/(d*s))[, 1]) || (d <= f[1] & s >= f[#f])} \\ Charles R Greathouse IV and M. F. Hasler, Oct 11 2012
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Oct 11 2012
STATUS
approved
Numbers n whose sum of digits, sum of square of digits and sum of cube of digits all have the same digital root.
+10
0
1, 9, 10, 11, 19, 36, 47, 63, 74, 90, 91, 99, 100, 101, 109, 110, 111, 119, 136, 147, 163, 174, 190, 191, 199, 306, 316, 333, 360, 361, 369, 396, 407, 417, 444, 470, 471, 479, 497, 603, 613, 630, 631, 639, 666, 693, 704, 714, 740, 741, 749, 777, 794, 900, 901, 909, 910, 911, 919, 936, 947, 963, 974, 990, 991, 999, 1000, 1001
OFFSET
1,2
EXAMPLE
a(6)=36 since (first power) 3+6=9; (second power) 3^2+6^2=9+36=45 and 4+5=9; (third power) 3^3+6^3=27+216=243 and 2+4+3=9.
PROG
(PARI) dr(n) = if (n, (n-1)%9+1); \\ from A010888
dsq(n) = if (n, d = digits(n); sum(id = 1, #d, d[id]^2));
dcb(n) = if (n, d = digits(n); sum(id = 1, #d, d[id]^3));
ok(n) = (dr(n) == dr(dcb(n))) && (dr(n) == dr(dsq(n))); \\ Michel Marcus, Sep 24 2013
CROSSREFS
Cf. A010888 (digital root of n), A007953, A003132, A055012.
KEYWORD
nonn,base
AUTHOR
Carmine Suriano, Sep 23 2013
EXTENSIONS
Title improved by Peter Bala, Sep 25 2013
STATUS
approved
Numbers n such that A290223(n) = 0.
+10
0
1, 19, 81, 162, 181, 199, 243, 262, 324, 343, 405, 424, 486, 505, 567, 648, 685, 729, 766, 810, 847, 891, 910, 928, 972, 1053, 1072, 1134, 1153, 1215, 1234, 1296, 1315, 1377, 1458, 1495, 1539, 1576, 1620, 1657, 1701, 1720, 1738, 1782, 1801, 1819, 1863, 1944, 1981, 1999, 2025, 2044, 2106, 2125, 2187, 2206, 2268
OFFSET
1,2
COMMENTS
This sequence is believed to be infinite.
EXAMPLE
181 is in this sequence because 181 - (1+8+1)^2 = 81. Then 81 - (8+1)^2 = 0.
PROG
(PARI)
a(n)=k=n; c=1; v=List(); listput(v, k); while(c, if(k>=0, k-=sumdigits(k)^2; c+=1; if(k==2||k==3||k==0||k==6||k==9, return(k)); if(vecsearch(Vec(v), k), return(sumdigits(abs(k)))); listput(v, k)); if(k<0, k+=sumdigits(-k)^2; c+=1; if(k==2||k==3||k==0||k==6||k==9, return(k)); if(vecsearch(Vec(v), k), return(sumdigits(abs(k)))); listput(v, k)); c+=1)
for(n=1, 10^4, if(a(n)==0, print1(n, ", ")))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Derek Orr, Jul 24 2017
STATUS
approved
Numbers n such that A290223(n) = 2.
+10
0
2, 23, 62, 77, 119, 194, 287, 398
OFFSET
1,1
COMMENTS
This sequence is believed to be finite. a(9) > 10^5, if it exists.
EXAMPLE
62 is in this sequence because 62 - (6+2)^2 = -2. Then -2 + (2)^2 = 2.
PROG
(PARI)
a(n)=k=n; c=1; v=List(); listput(v, k); while(c, if(k>=0, k-=sumdigits(k)^2; c+=1; if(k==2||k==3||k==0||k==6||k==9, return(k)); if(vecsearch(Vec(v), k), return(sumdigits(abs(k)))); listput(v, k)); if(k<0, k+=sumdigits(-k)^2; c+=1; if(k==2||k==3||k==0||k==6||k==9, return(k)); if(vecsearch(Vec(v), k), return(sumdigits(abs(k)))); listput(v, k)); c+=1)
for(n=1, 10^5, if(a(n)==2, print1(n, ", ")))
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Derek Orr, Jul 24 2017
STATUS
approved

Search completed in 0.043 seconds