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.

A067666 Sum of squares of prime factors of n (counted with multiplicity).

Original entry on oeis.org

0, 4, 9, 8, 25, 13, 49, 12, 18, 29, 121, 17, 169, 53, 34, 16, 289, 22, 361, 33, 58, 125, 529, 21, 50, 173, 27, 57, 841, 38, 961, 20, 130, 293, 74, 26, 1369, 365, 178, 37, 1681, 62, 1849, 129, 43, 533, 2209, 25, 98, 54, 298, 177, 2809, 31, 146, 61, 370, 845, 3481
Offset: 1

Views

Author

Henry Bottomley, Feb 04 2002

Keywords

Comments

16 and 27 are fixed points, ... and see Rivera link. - Michel Marcus, Sep 19 2020

Examples

			a(2) = 2^2 = 4;
a(45) = a(3*3*5) = 3^2 + 3^2 + 5^2 = 43.
		

Crossrefs

Cf. A166319 (where a(n)<=n), A001222, A001414, A005063, A078137, A081403.

Programs

  • Maple
    A067666 := proc(n)
        add(op(2,pe)*op(1,pe)^2, pe=ifactors(n)[2]) ;
    end proc:
    seq(A067666(n),n=1..100) ;# R. J. Mathar, Jul 31 2024
  • Mathematica
    Join[{0},Table[Total[Flatten[Table[#[[1]],{#[[2]]}]&/@ FactorInteger[ n]]^2],{n,2,60}]] (* Harvey P. Dale, Dec 24 2012 *)
    Join[{0}, Table[Total[#[[1]]^2*#[[2]] & /@ FactorInteger[n]], {n, 2, 60}]] (* Zak Seidov, Apr 18 2013 *)
  • PARI
    a(n)=local(fm,t);fm=factor(n);t=0;for(k=1,matsize(fm)[1],t+=fm[k,1]^2*fm[k,2]);t \\ Franklin T. Adams-Watters, May 03 2009
    
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, f[k,1]^2*f[k,2]); \\ Michel Marcus, Sep 19 2020

Formula

a(x*y) = a(x) + a(y); a(p^k) = k*p^2 for p prime.
Totally additive with a(p) = p^2.

Extensions

Values through a(59) verified by Franklin T. Adams-Watters, May 03 2009

A259942 Numbers that are larger than or equal to the sum of the cubes of their prime factors (with multiplicity).

Original entry on oeis.org

1, 64, 96, 108, 128, 144, 162, 192, 216, 240, 243, 256, 270, 288, 300, 320, 324, 360, 384, 400, 405, 432, 448, 450, 480, 486, 500, 504, 512, 540, 560, 567, 576, 600, 625, 630, 640, 648, 672, 675, 700, 720, 729, 750, 756, 768, 784, 800, 810, 840, 864, 875, 882, 896, 900, 945, 960, 972, 980, 1000
Offset: 1

Views

Author

Francesco Di Matteo, Nov 08 2015

Keywords

Comments

This sequence is analogous to A166319 but with cubes instead of squares.

Examples

			64 = 2*2*2*2*2*2 >= 6 * 2^3, so 64 is in the sequence.
96 = 3*2*2*2*2*2 >= 3^3 + 5 * 2^3, so 96 is in the sequence.
256 = 4*4*4*4 >= 4*4^3, so 256 is in the sequence.
		

Crossrefs

Programs

  • Maple
    isA259942 := proc(n)
        local ifa;
        ifa := ifactors(n)[2] ;
        return (n >= add( op(2,p)*op(1,p)^3,p=ifa)) ;
    end proc:
    for n from 0 to 1000 do
        if isA259942(n) then
            printf("%d,",n);
        end if;
    end do: # R. J. Mathar, Nov 27 2015
  • Mathematica
    scpfQ[n_]:=n>=Total[Flatten[Table[#[[1]],{#[[2]]}]&/@ FactorInteger[ n]]^3]; Select[Range[1000],scpfQ] (* Harvey P. Dale, Dec 25 2015 *)
  • PARI
    isok(n) = {my(f = factor(n)); n >= sum(k=1, #f~, f[k,2]*f[k,1]^3);} \\ Michel Marcus, Nov 28 2015
  • Python
    from sympy import factorint
    for j in range(1, 1001):
        k =  factorint(j)
        it = list(k.keys())
        va = list(k.values())
        alfa = 0
        for l in range(0,len(k)):
            alfa = alfa + va[l]*(it[l]**3)
        if alfa <=j:
            print(j)
    
Showing 1-2 of 2 results.