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

A057531 Numbers whose sum of digits and number of divisors are equal.

Original entry on oeis.org

1, 2, 11, 22, 36, 84, 101, 152, 156, 170, 202, 208, 225, 228, 288, 301, 372, 396, 441, 444, 468, 516, 525, 530, 602, 684, 710, 732, 804, 828, 882, 952, 972, 1003, 1016, 1034, 1070, 1072, 1106, 1111, 1164, 1236, 1304, 1308, 1425, 1472, 1476, 1521, 1524
Offset: 1

Views

Author

Asher Auel, Sep 03 2000

Keywords

Comments

[A007953(n)/A000005(n) = c] AND [A000005(n)/A007953(n) = c], c an integer. - Ctibor O. Zizka, Jun 26 2009

Examples

			36 is a term as the sum of the digits of 36 is 3+6 = 9 and the number of divisors is 9 too.
		

Crossrefs

Programs

  • Mathematica
    Select[ Range[ 1000 ], DivisorSigma[ 0, # ]==Plus@@IntegerDigits[ # ]& ] (* Harvey P. Dale, Feb 19 2004 *)

A050689 Composites whose sum of digits equals number of its prime factors, with multiplicity.

Original entry on oeis.org

12, 30, 32, 40, 102, 220, 240, 500, 600, 1002, 1012, 1104, 1152, 1210, 1320, 1500, 2001, 2002, 2020, 2040, 2120, 2240, 2300, 3010, 3040, 3300, 4032, 4100, 4320, 5100, 5200, 6400, 7000, 7200, 10001, 10002, 10011, 10030, 10040, 10080, 10140, 10220, 10304, 10800
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Comments

The sequence is infinite because there are infinitely many primes whose sum of digits is odd (see related comment in A119450). Let p be one of them, and let k be its digital sum. Then p*10^((k-1)/2) is a term. For example, 41*10^2 is a term. - Metin Sariyar, May 30 2020

Examples

			2002 is a term since 2+0+0+2 = 4, and 2002 = 2*7*11*13 has 4 prime factors.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10300],!PrimeQ[#]&&PrimeOmega[#]==Total[IntegerDigits[#]]&] (* Jayanta Basu, May 30 2013 *)
  • PARI
    isok(n) = sumdigits(n) == bigomega(n); \\ Michel Marcus, Feb 13 2017
    
  • Python
    from sympy import factorint
    def ok(n): return 1 < sum(map(int, str(n))) == sum(factorint(n).values())
    print([k for k in range(11000) if ok(k)]) # Michael S. Branicky, Dec 30 2021

A067077 Numbers whose product of distinct prime factors is equal to its sum of digits.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 24, 375, 392, 640, 2401, 4802, 4913, 6400, 7744, 17576, 42592, 64000, 106496, 234256, 295936, 468750, 546875, 628864, 640000, 877952, 1124864, 1966080, 2839714, 3687936, 4687500, 4816896, 4952198, 6400000, 6453888
Offset: 1

Views

Author

Joseph L. Pe, Feb 18 2002

Keywords

Comments

The product of the distinct prime factors of n (the squarefree kernel of n) is also denoted by rad(n) = A007947(n). - Giovanni Resta, Apr 21 2017

Examples

			The prime factors of 375 are 3,5, which have product = 15, the sum of the digits of 375, so 375 is a term of the sequence.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Times@@ (First/@ FactorInteger[n]); g[n_] := Plus @@ IntegerDigits[n]; Select[Range[10^5], f[#] == g[#] &] (* or *)
    nd=12; up=10^nd; L={1}; Do[If[SquareFreeQ[su], ps = First /@ FactorInteger[su]; nps = Length@ ps; Clear[ric]; ric[n_, i_] := Block[{e = 0, m}, If[i > nps, If[Plus @@ IntegerDigits[su n] == su, Sow[su n]], While[ (m = n ps[[i]]^e ) su < up, ric[m, i+1]; e++]]]; z = Reap[ ric[1, 1]][[2]]; If[z != {}, L = Union[L, z[[1]]]]], {su, 2, 9 nd}]; L (* fast, terms < 10^12, Giovanni Resta, Apr 21 2017 *)
    Select[Range[65*10^5],Times@@FactorInteger[#][[All,1]]==Total[ IntegerDigits[ #]]&] (* Harvey P. Dale, Dec 16 2018 *)
  • PARI
    isok(k)={vecprod(factor(k)[,1]) == sumdigits(k)} \\ Harry J. Smith, May 06 2010

Extensions

a(19)-a(35) from Donovan Johnson, Sep 29 2009
a(1)=1 prepended by Giovanni Resta, Apr 21 2017

A070274 Numbers n such that sum of digits of n equals the squarefree part of n.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 12, 24, 100, 150, 200, 300, 320, 375, 500, 600, 640, 700, 704, 735, 832, 960, 1014, 1088, 1200, 1815, 2023, 2400, 2535, 2940, 3549, 3610, 3840, 4046, 4335, 4913, 5054, 5376, 5415, 5491, 6069, 6137, 6358, 6647, 7260, 7581, 7942, 8959, 9386
Offset: 1

Views

Author

Benoit Cloitre, May 09 2002

Keywords

Comments

The squarefree part of x, core(x), is the smallest integer such that x*core(x) is a square.

Crossrefs

Programs

  • Mathematica
    core[n_]:=Block[{f=FactorInteger[n], p, e}, {p, e} = Transpose[f]; Times@@ (p^Mod[e, 2])]; Select[Range[10^4], core[#] == Plus @@ IntegerDigits[#] &] (* Giovanni Resta, Apr 21 2017 *)
  • PARI
    list(lim)=my(v=List()); forfactored(n=1,lim\1, if(core(n)==sumdigits(n[1]), listput(v,n[1]))); Vec(v) \\ Charles R Greathouse IV, Nov 05 2017

Extensions

Data corrected by Giovanni Resta, Apr 21 2017

A285494 Numbers k such that digit sum of k = number of distinct prime factors of k.

Original entry on oeis.org

20, 30, 102, 120, 200, 300, 1002, 1200, 2000, 2001, 2002, 3000, 3010, 10001, 10002, 10011, 10030, 10120, 11001, 11020, 11110, 12000, 20000, 20001, 21010, 30000, 30030, 30100, 100001, 100030, 100101, 100130, 100210, 100300, 101001, 101101, 101200, 102102, 110001, 110200
Offset: 1

Views

Author

Jonathan Frech, Apr 19 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[2,10000],Total[IntegerDigits[#]]==Length[FactorInteger[#]]&] (* or *)
    nd = 10; s = 1; Sort@ Flatten@ Reap[ While[ Times @@ Prime[ Range@ s] < 10^nd, pa = IntegerPartitions[s, {nd}, Range[0, 9]]; Do[Sow@ Select[ FromDigits /@ Permutations[p], PrimeNu[#] == s &], {p, pa}]; s++]][[2, 1]] (* terms < 10^10, Giovanni Resta, Apr 21 2017 *)
  • PARI
    isok(n) = sumdigits(n) == omega(n); \\ Michel Marcus, Apr 20 2017

Extensions

More terms from Michel Marcus, Apr 20 2017

A050690 Sum of digits of zero-absent composite a(n) equals number of prime factors.

Original entry on oeis.org

12, 32, 1152, 11232, 13122, 14112, 21312, 111132, 112112, 3121152, 11231232, 11354112, 812122112, 1251213312, 2211121152, 2211213312, 5121114112, 26122125312, 56321114112, 62214111232, 431711322112, 3421411213312, 11111212122112, 11112113242112
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Comments

10^11 < a(21) <= 431711322112. a(22) <= 3421411213312. - Donovan Johnson, May 30 2010
Do all terms end in 2, i.e., is each term = 2 mod 10? - Harvey P. Dale, May 26 2024

Examples

			E.g., 21312 (no zero in the string) gives 2+1+3+1+2 = 9 prime factors, namely, 2*2*2*2*2*2*3*3*37.
		

Crossrefs

Programs

  • Mathematica
    t={}; Do[If[FreeQ[x=IntegerDigits[n],0]&&PrimeOmega[n]==Total[x],AppendTo[t,n]],{n,2,3220000,2}]; t (* Jayanta Basu, May 30 2013 *)

Extensions

a(15)-a(20) from Donovan Johnson, May 30 2010
a(21)-a(22) confirmed by Giovanni Resta, Jun 02 2013
a(23)-a(24) from Giovanni Resta, Apr 23 2017

A356981 Numbers k such that the sum of distinct digits of k equals the sum of the prime divisors of k.

Original entry on oeis.org

2, 3, 5, 7, 84, 144, 160, 250, 343, 468, 735, 936, 975, 1125, 1215, 1375, 1408, 1600, 1694, 1872, 2401, 2500, 2646, 2880, 3920, 4913, 6084, 6318, 6860, 7296, 7695, 8624, 8704, 8788, 9126, 10125, 10240, 10816, 11264, 12672, 12675, 14641, 14896, 16000
Offset: 1

Views

Author

Tanya Khovanova, Sep 09 2022

Keywords

Comments

Similar to A070275, where distinctness of digits is not required.

Examples

			144 = 2^4*3^2 and 1+4=2+3. Thus, 144 is in this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 20000],Total[Union[IntegerDigits[#]]] ==  Total[Transpose[FactorInteger[#]][[1]]] &]
  • PARI
    isok(k) = vecsum(Set(digits(k))) == vecsum(factor(k)[, 1]); \\ Michel Marcus, Sep 12 2022
  • Python
    from itertools import count, islice
    from sympy import primefactors
    def A356981_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda k:sum(int(d) for d in set(str(k)))==sum(primefactors(k)), count(max(startvalue,1)))
    A356981_list = list(islice(A356981_gen(),30)) # Chai Wah Wu, Sep 12 2022
    

A376157 Numbers k such that the sum of the digits of k equals the sum of its prime factors plus the sum of the multiplicities of each prime factor.

Original entry on oeis.org

4, 25, 36, 54, 125, 192, 289, 297, 343, 392, 448, 676, 756, 1089, 1536, 1764, 1936, 2646, 2888, 3872, 4802, 4860, 6174, 6250, 6776, 6860, 7290, 7488, 7680, 8750, 8775, 9408, 9747, 10648, 14739, 15309, 16848, 18432, 18865, 21296, 22869, 25725, 29988, 33750, 33957
Offset: 1

Views

Author

Jordan Brooks, Sep 12 2024

Keywords

Examples

			For k = 54, its prime factorization is 2^1*3^3: 5+4 = 2+1+3+3 = 9.
For k = 756, its prime factorization is 2^2*3^3*7^1: 7+5+6 = 2+2+3+3+7+1 = 18.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[34000], DigitSum[#]==Total[Flatten[FactorInteger[#]]] &] (* Stefano Spezia, Sep 14 2024 *)
  • PARI
    isok(k)={my(f=factor(k)); vecsum(f[,1]) + vecsum(f[,2]) == sumdigits(k)} \\ Andrew Howroyd, Sep 26 2024
  • Python
    from sympy.ntheory import factorint
    c = 2
    while c < 10000:
        charsum = 0
        for char in str(c):
            charsum += int(char)
        pf = factorint(c)
        cand = 0
        for p in pf.keys():
            cand += p
            cand += pf[p]
        if charsum == cand:
            print(c)
            print(pf)
        c += 1
    

Formula

{ k : A007953(k) = A008474(k) }.
Showing 1-8 of 8 results.