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-10 of 13 results. Next

A386257 Numbers k such that k + A067666(k) is a square.

Original entry on oeis.org

1, 15, 80, 192, 1472, 1482, 1512, 1539, 1938, 2090, 2197, 2370, 2805, 3045, 4095, 4356, 4557, 5796, 5978, 6018, 6156, 7130, 7920, 11445, 12125, 12852, 13578, 13800, 15435, 20405, 26562, 29375, 29592, 30996, 31141, 31682, 32205, 42975, 45733, 46060, 49218, 50652, 51645, 51834, 52767, 54272, 55272
Offset: 1

Views

Author

Will Gosnell and Robert Israel, Jul 16 2025

Keywords

Comments

Numbers k such that the sum of k and the squares of its prime factors with multiplicity is a square.
The only term that is a semiprime is 15.
The generalized Bunyakovsky conjecture implies that there are infinitely many pairs of primes (p,q) with 4 * q = 21 * p^2 - 10 * p - 99. For such p and q, 5*p*q is a term.

Examples

			a(4) = 192 is a term because 192 = 2^6 * 3 and 192 + 6 * 2^2 + 3^2 = 225 = 15^2 is a square.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local t;
      issqr(n + add(t[1]^2*t[2],t=ifactors(n)[2]))
    end proc:
    select(filter, [$1..10^5]);
  • Mathematica
    spf[{p_,e_}]:=e*p^2;Q[k_]:=IntegerQ[Sqrt[k+Total[spf/@FactorInteger[k]]]];Join[{1},Select[Range[56000],Q[#]&]] (* James C. McMahon, Jul 23 2025 *)
  • PARI
    isok(k) = my(f=factor(k)); issquare(k + sum(i=1, #f~, f[i, 1]^2*f[i, 2])); \\ Michel Marcus, Jul 20 2025

A386304 Numbers k such that k - A067666(k) is a square.

Original entry on oeis.org

1, 16, 27, 75, 128, 343, 475, 600, 663, 715, 759, 1015, 1845, 2679, 3717, 3933, 4440, 5083, 5325, 5467, 6120, 6210, 6325, 6405, 6859, 7029, 8349, 8541, 8664, 9125, 9960, 12045, 12427, 12535, 13509, 15067, 16677, 18693, 18711, 21783, 22797, 23250, 23560, 24605, 25527, 26496, 26967, 27117, 28557
Offset: 1

Views

Author

Will Gosnell and Robert Israel, Jul 17 2025

Keywords

Comments

Numbers k such that k minus the sum of the squares of its prime factors with multiplicity is a square.
Is there any number other than 1 in both this sequence and A386257?
Contains no semiprimes.

Examples

			a(4) = 75 is a term because 75 = 3 * 5^2 and 75 - 3^2 - 2 * 5^2 = 16 = 4^2 is a square.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local t;
      issqr(n - add(t[1]^2*t[2], t=ifactors(n)[2]))
    end proc:
    select(filter, [$1..10^5]);
  • Mathematica
    spf[{p_,e_}]:=e*p^2;Q[k_]:=IntegerQ[Sqrt[k-Total[spf/@FactorInteger[k]]]];Select[Range[29000],Q[#]&] (* James C. McMahon, Jul 23 2025 *)
  • PARI
    isok(k) = my(f=factor(k)); issquare(k - sum(i=1, #f~, f[i, 1]^2*f[i, 2])); \\ Michel Marcus, Jul 20 2025

A168521 Sort numbers by value of sum of squares of prime factors (cf. A067666). Break ties by putting smaller numbers first. Begin with 0, 1.

Original entry on oeis.org

0, 1, 2, 4, 3, 8, 6, 16, 12, 9, 32, 24, 18, 64, 5, 48, 36, 27, 128, 10, 96, 72, 54, 256, 20, 192, 15, 144, 108, 81, 512, 40, 384, 30, 288, 216, 162, 1024, 80, 768, 60, 576, 45, 432, 324, 2048, 160, 243, 1536, 120, 1152, 90, 864, 648, 4096, 7, 320, 486, 3072, 25, 240
Offset: 1

Views

Author

Keith Flower (keith.flower(AT)gmail.com), Nov 28 2009

Keywords

Comments

Represent each number m by a corresponding point, P_m, in Euclidean space, such that the prime factors of m are the co-ordinates of P_m. In this sequence, the numbers appear in order of distance from the origin of their corresponding points.

Examples

			For m = 7, distance d from the origin of P_7 is 7, for m = 8192 (P_8192 = [2,2,2,2,2,2,2,2,2,2,2,2,2]) d = sqrt(13*2^2) = 7.211102550927978. So 7 appears before 8192.
Explanatory table for initial terms:
  n  a(n)   P_{a(n)}
  1    0                (appears here as prescribed)
  2    1                (appears here as prescribed)
                      Calculation of d^2
  3    2 -> [2]       -> 2^2 = 4
  4    4 -> [2,2]     -> 2^2 + 2^2 = 8
  5    3 -> [3]       -> 3^3 = 9
  6    8 -> [2,2,2]   -> 2^2 + 2^2 + 2^2 = 12
  7    6 -> [2,3]     -> 2^2 + 3^2 = 13
  8   16 -> [2,2,2,2] -> 2^2 + 2^2 + 2^2 + 2^2 = 16
  9   12 -> [2,2,3]   -> 2^2 + 2^2 + 3^2 = 17
		

Crossrefs

Similarly defined sequences: A064364, A178595.

Formula

For n >= 2, Sum_{k=1..A001222(a(n))} A027746(a(n),k)^2 <= Sum_{k=1..A001222(a(n+1))} A027746(a(n+1),k)^2. - Peter Munn, Aug 17 2022

Extensions

Definition edited by N. J. A. Sloane, Nov 29 2009
It would also be worthwhile computing the companion sequence where ties are broken according to lexicographic order of the lists of prime factors (so that 48 would come before 5, instead of after). - N. J. A. Sloane, Nov 29 2009
More terms from R. J. Mathar, Jan 25 2010
Edited by Peter Munn, Aug 17 2022

A001414 Integer log of n: sum of primes dividing n (with repetition). Also called sopfr(n).

Original entry on oeis.org

0, 2, 3, 4, 5, 5, 7, 6, 6, 7, 11, 7, 13, 9, 8, 8, 17, 8, 19, 9, 10, 13, 23, 9, 10, 15, 9, 11, 29, 10, 31, 10, 14, 19, 12, 10, 37, 21, 16, 11, 41, 12, 43, 15, 11, 25, 47, 11, 14, 12, 20, 17, 53, 11, 16, 13, 22, 31, 59, 12, 61, 33, 13, 12, 18, 16, 67, 21, 26, 14, 71, 12, 73, 39, 13, 23, 18, 18
Offset: 1

Views

Author

Keywords

Comments

MacMahon calls this the potency of n.
Downgrades the operators in a prime decomposition. E.g., 40 factors as 2^3 * 5 and sopfr(40) = 2 * 3 + 5 = 11.
Consider all ways of writing n as a product of zero, one, or more factors; sequence gives smallest sum of terms. - Amarnath Murthy, Jul 07 2001
a(n) <= n for all n, and a(n) = n iff n is 4 or a prime.
Look at the graph of this sequence. At the lower edge of the logarithmic scatterplot there is a set of fuzzy but unmistakable diagonal fringes, sloping toward the southeast. Their spacing gradually increases, and their slopes gradually decrease; they are more distinct toward the lower edge of the range. Is any explanation known? - Allan C. Wechsler, Oct 11 2015
For n >= 2, the glb and lub are: 3 * log(n) / log(3) <= a(n) <= n, where the lub occurs when n = 3^k, k >= 1. (Jakimczuk 2012) - Daniel Forgues, Oct 12 2015
Except for the initial term, row sums of A027746. - M. F. Hasler, Feb 08 2016
Atanassov proves that a(n) <= A065387(n) - n. - Charles R Greathouse IV, Dec 06 2016
From Robert G. Wilson v, Aug 15 2022: (Start)
Differs from A337310 beginning with n at 64, 192, 256, 320, 448, 512, ..., .
The number of terms which equal k is A000607(k).
The first occurrence of k>1 is A056240(k).
The last occurrence of k>1 is A000792(k).
The Amarnath Murthy comment of Jul 07 2001 is a result of the fundamental theorem of arithmetic.
(End)

Examples

			a(24) = 2+2+2+3 = 9.
a(30) = 10: 30 can be written as 30, 15*2, 10*3, 6*5, 5*3*2. The corresponding sums are 30, 17, 13, 11, 10. Among these 10 is the least.
		

References

  • K. Atanassov, New integer functions, related to ψ and σ functions. IV., Bull. Number Theory Related Topics 12 (1988), pp. 31-35.
  • Amarnath Murthy, Generalization of Partition function and introducing Smarandache Factor Partition, Smarandache Notions Journal, Vol. 11, 1-2-3, Spring-2000.
  • Amarnath Murthy and Charles Ashbacher, Generalized Partitions and Some New Ideas on Number Theory and Smarandache Sequences, Hexis, Phoenix; USA 2005. See Section 1.4.
  • Joe Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 89.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A000607(n) gives the number of values of k for which A001414(k) = n.
Cf. A036349 (indices of even terms), A356163 (their char. function), A335657 (indices of odd terms), A289142 (of multiples of 3), A373371 (their char. function).
For sum of squares of prime factors see A067666, for cubes see A224787.
Other completely additive sequences with primes p mapped to a function of p include: A001222 (with a(p)=1), A056239 (with a(p)=primepi(p)), A059975 (with a(p)=p-1), A064097 (with a(p)=1+a(p-1)), A113177 (with a(p)=Fib(p)), A276085 (with a(p)=p#/p), A341885 (with a(p)=p*(p+1)/2), A373149 (with a(p)=prevprime(p)), A373158 (with a(p)=p#).
For other completely additive sequences see the cross-references in A104244.

Programs

  • Haskell
    a001414 1 = 0
    a001414 n = sum $ a027746_row n
    -- Reinhard Zumkeller, Feb 27 2012, Nov 20 2011
    
  • Magma
    [n eq 1 select 0 else (&+[j[1]*j[2]: j in Factorization(n)]): n in [1..100]]; // G. C. Greubel, Jan 10 2019
  • Maple
    A001414 := proc(n) add( op(1,i)*op(2,i),i=ifactors(n)[2]) ; end proc:
    seq(A001414(n), n=1..100); # Peter Luschny, Jan 17 2011
  • Mathematica
    a[n_] := Plus @@ Times @@@ FactorInteger@ n; a[1] = 0; Array[a, 78] (* Ray Chandler, Nov 12 2005 *)
  • PARI
    a(n)=local(f); if(n<1,0,f=factor(n); sum(k=1,matsize(f)[1],f[k,1]*f[k,2]))
    
  • PARI
    A001414(n) = (n=factor(n))[,1]~*n[,2] \\ M. F. Hasler, Feb 07 2009
    
  • Python
    from sympy import factorint
    def A001414(n):
        return sum(p*e for p,e in factorint(n).items()) # Chai Wah Wu, Jan 08 2016
    
  • Sage
    [sum(factor(n)[j][0]*factor(n)[j][1] for j in range(0,len(factor(n)))) for n in range(1,79)] # Giuseppe Coppoletta, Jan 19 2015
    

Formula

If n = Product p_j^k_j then a(n) = Sum p_j * k_j.
Dirichlet g.f. f(s)*zeta(s), where f(s) = Sum_{p prime} p/(p^s-1) = Sum_{k>0} primezeta(k*s-1) is the Dirichlet g.f. for A120007. Totally additive with a(p^e) = p*e. - Franklin T. Adams-Watters, Jun 02 2006
For n > 1: a(n) = Sum_{k=1..A001222(n)} A027746(n,k). - Reinhard Zumkeller, Aug 27 2011
Sum_{n>=1} (-1)^a(n)/n^s = ((2^s + 1)/(2^s - 1))*zeta(2*s)/zeta(s), if Re(s)>1 and 0 if s=1 (Alladi and Erdős, 1977). - Amiram Eldar, Nov 02 2020
a(n) >= k*log(n), where k = 3/log(3). This bound is sharp. - Charles R Greathouse IV, Jul 28 2025

A005063 Sum of squares of primes dividing n.

Original entry on oeis.org

0, 4, 9, 4, 25, 13, 49, 4, 9, 29, 121, 13, 169, 53, 34, 4, 289, 13, 361, 29, 58, 125, 529, 13, 25, 173, 9, 53, 841, 38, 961, 4, 130, 293, 74, 13, 1369, 365, 178, 29, 1681, 62, 1849, 125, 34, 533, 2209, 13, 49, 29, 298, 173, 2809, 13, 146, 53, 370, 845, 3481, 38, 3721
Offset: 1

Views

Author

Keywords

Comments

The set of these terms apart from 0 is A048261. - Bernard Schott, Feb 10 2022
Inverse Möbius transform of n^2 * c(n), where c(n) is the prime characteristic (A010051). - Wesley Ivan Hurt, Jun 22 2024

Crossrefs

Sum of the k-th powers of the primes dividing n for k=0..10 : A001221 (k=0), A008472 (k=1), this sequence (k=2), A005064 (k=3), A005065 (k=4), A351193 (k=5), A351194 (k=6), A351195 (k=7), this sequence (k=8), A351197 (k=9), A351198 (k=10).
Cf. A010051.

Programs

Formula

Additive with a(p^e) = p^2.
G.f.: Sum_{k>=1} prime(k)^2*x^prime(k)/(1 - x^prime(k)). - Ilya Gutkovskiy, Dec 24 2016
From Antti Karttunen, Jul 11 2017: (Start)
a(n) = A005066(n) + 4*A059841(n).
a(n) = A005079(n) + A005083(n) + 4*A059841(n).
a(n) = A005071(n) + A005075(n) + 9*A079978(n).
(End)
Dirichlet g.f.: primezeta(s-2)*zeta(s). - Benedict W. J. Irwin, Jul 11 2018
a(n) = Sum_{p|n, p prime} p^2. - Wesley Ivan Hurt, Feb 04 2022
a(n) = Sum_{d|n} d^2 * c(d), where c = A010051. - Wesley Ivan Hurt, Jun 22 2024

Extensions

More terms from Franklin T. Adams-Watters, May 03 2009

A224787 Sum of cubes of prime factors of n (counted with multiplicity).

Original entry on oeis.org

0, 8, 27, 16, 125, 35, 343, 24, 54, 133, 1331, 43, 2197, 351, 152, 32, 4913, 62, 6859, 141, 370, 1339, 12167, 51, 250, 2205, 81, 359, 24389, 160, 29791, 40, 1358, 4921, 468, 70, 50653, 6867, 2224, 149, 68921, 378, 79507, 1347, 179, 12175, 103823, 59, 686, 258
Offset: 1

Views

Author

Jiwon Lee, Apr 17 2013

Keywords

Crossrefs

Programs

  • Maple
    A224787 := proc(n)
        local a,pe,p,e ;
        a := 0 ;
        for pe in ifactors(n)[2] do
            p := op(1,pe) ;
            e := op(2,pe) ;
            a := a+e*p^3;
        end do:
        a ;
    end proc:
    seq(A224787(n),n=1..20) ; # R. J. Mathar, Mar 25 2025
  • Mathematica
    Join[{0}, Table[{p, e} = Transpose[FactorInteger[n]]; Total[e*p^3], {n, 2, 50}]] (* T. D. Noe, Apr 17 2013 *)

Extensions

Extended by T. D. Noe, Apr 17 2013

A163407 Sum of semiprime divisors of n with repetition.

Original entry on oeis.org

0, 0, 0, 4, 0, 6, 0, 12, 9, 10, 0, 16, 0, 14, 15, 24, 0, 21, 0, 24, 21, 22, 0, 30, 25, 26, 27, 32, 0, 31, 0, 40, 33, 34, 35, 37, 0, 38, 39, 42, 0, 41, 0, 48, 39, 46, 0, 48, 49, 45, 51, 56, 0, 45, 55, 54, 57, 58, 0, 51, 0, 62, 51, 60, 65, 61, 0, 72, 69, 59, 0, 57, 0, 74, 55, 80, 77, 71, 0
Offset: 1

Views

Author

Keywords

Comments

We regard each prime divisor of n as distinct, and count each product of an unordered, distinct pair of them as a semiprime divisor.

Examples

			For n = 12, the prime divisors with repetition are 2,2,3. Distinguishing the 2s as 2 and 2', we have semiprime divisors 2*2', 2*3, and 2'*3, totaling 4+6+6 = 16.
		

Crossrefs

Programs

  • PARI
    a(n)=local(fn,p,e,s,ss);fn=factor(n);for(i=1,matsize(fn)[1],p=fn[i,1];e=fn[i,2];s+=p*e;ss+=p^2*e);(s^2-ss)\2

Formula

If s is the sum of the prime divisors of n with repetition, and ss is the sum of their squares, a(n) = (s^2 - ss) / 2.

A114989 Numbers whose sum of squares of distinct prime factors is prime.

Original entry on oeis.org

6, 10, 12, 14, 18, 20, 24, 26, 28, 34, 36, 40, 48, 50, 52, 54, 56, 68, 72, 74, 80, 94, 96, 98, 100, 104, 105, 108, 112, 134, 136, 144, 146, 148, 160, 162, 188, 192, 194, 196, 200, 206, 208, 216, 224, 231, 250, 268, 272, 273, 274, 288, 292, 296, 315, 320, 324, 326
Offset: 1

Views

Author

Jonathan Vos Post, Feb 22 2006

Keywords

Comments

A005063 is "sum of squares of primes dividing n." Hence this is the sum of squares of prime factors analog of A114522 "numbers n such that sum of distinct prime divisors of n is prime." Note the distinction between A005063 and A067666 is "sum of squares of prime factors of n (counted with multiplicity)."

Examples

			a(1) = 6 because 6 = 2 * 3 and 2^2 + 3^2 = 13 is prime.
a(2) = 10 because 10 = 2 * 5 and 2^2 + 5^2 = 29 is prime.
a(3) = 12 because 12 = 2^2 * 3 and 2^2 + 3^2 = 13 is prime (note that we are not counting the prime factors with multiplicity).
a(4) = 14 because 14 = 2 * 7 and 2^2 + 7^2 = 53 is prime.
a(8) = 26 because 26 = 2 * 3 and 2^2 + 13^2 = 173 is prime.
a(10) = 34 because 34 = 2 * 17 and 2^2 + 17^2 = 293 is prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local DPF: DPF:=factorset(n): if isprime(sum(DPF[j]^2,j=1..nops(DPF)))=true then n else fi end: seq(a(n),n=1..400); # Emeric Deutsch, Mar 07 2006
  • Mathematica
    Select[Range[400],PrimeQ[Total[Transpose[FactorInteger[#]][[1]]^2]]&] (* Harvey P. Dale, Jan 16 2016 *)
  • PARI
    is(n)=isprime(norml2(factor(n)[,1]))

Formula

{k such that A005063(k) is prime}. {k such that A005063(k) is an element of A000040}. {k = (for distinct i, j, ... prime(i)^e_1 * prime(j)^e_2 * ...) such that (prime(i)^2 * prime(j)^2 * ...) is prime}.

Extensions

More terms from Emeric Deutsch, Mar 07 2006

A166319 Numbers that are >= the sum of squares of their prime divisors (with multiplicity).

Original entry on oeis.org

0, 1, 16, 24, 27, 32, 36, 40, 45, 48, 54, 60, 64, 72, 75, 80, 81, 84, 90, 96, 100, 105, 108, 112, 120, 125, 126, 128, 135, 140, 144, 147, 150, 160, 162, 165, 168, 175, 176, 180, 189, 192, 196, 198, 200, 208, 210, 216, 220, 224, 225, 231, 234, 240, 243, 245, 250, 252, 256, 260, 264
Offset: 1

Views

Author

Claudio Meller, Oct 11 2009

Keywords

Comments

Indices m where A067666(m) <= m. Apparently the equality only holds at m=16 and 27.
Members are highly smooth, i.e., they factor mostly into small prime numbers. What are the asymptotics of the largest prime factor of a(n)? - Ralf Stephan, Dec 23 2013
Equality A067666(m) = m also holds for 45*A*B where A = (C^107+D^107)/(C+D), B = (C^109+D^109)/(C+D), C = (sqrt(47)+sqrt(43))/2, D = (sqrt(47)-sqrt(43))/2. Maple confirms A and B are prime. - Michael R Peake, Apr 09 2020

Examples

			24 = 2*2*2*3 >= 2^2 + 2^2 + 2^2 + 3^2 = 21, so 24 is in the sequence.
		

Programs

  • Maple
    isA166319 := proc(n)
        local ifa;
        ifa := ifactors(n)[2] ;
        return (n >= add( op(2,p)*op(1,p)^2,p=ifa)) ;
    end proc:
    for n from 0 to 1000 do
        if isA166319(n) then
            printf("%d,",n);
        end if;
    end do: # R. J. Mathar, Nov 27 2015
  • Mathematica
    highlySmoothQ[n_] := (pp = Table[#[[1]], #[[2]]]& /@ FactorInteger[n] // Flatten; Times @@ pp >= pp.pp); Select[Range[0, 300], highlySmoothQ] (* Jean-François Alcover, Feb 02 2018 *)
  • PARI
    is(n)=f=factor(n); n>=sum(i=1,matsize(f)[1],f[i,2]*f[i,1]^2) \\ Ralf Stephan, Dec 23 2013

Extensions

Edited by Ralf Stephan, Dec 23 2013
Replaced incorrect definition with alternative supplied by Ralf Stephan, Dec 23 2013 [N. J. A. Sloane, Nov 23 2015]

A332385 Sum of squares of indices of distinct prime factors of n.

Original entry on oeis.org

0, 1, 4, 1, 9, 5, 16, 1, 4, 10, 25, 5, 36, 17, 13, 1, 49, 5, 64, 10, 20, 26, 81, 5, 9, 37, 4, 17, 100, 14, 121, 1, 29, 50, 25, 5, 144, 65, 40, 10, 169, 21, 196, 26, 13, 82, 225, 5, 16, 10, 53, 37, 256, 5, 34, 17, 68, 101, 289, 14, 324, 122, 20, 1, 45, 30, 361, 50, 85, 26, 400, 5, 441, 145, 13
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 10 2020

Keywords

Examples

			a(21) = a(3 * 7) = a(prime(2) * prime(4)) = 2^2 + 4^2 = 20.
		

Crossrefs

Programs

  • Maple
    a:= n-> add(numtheory[pi](i[1])^2, i=ifactors(n)[2]):
    seq(a(n), n=1..80);  # Alois P. Heinz, Feb 10 2020
  • Mathematica
    nmax = 75; CoefficientList[Series[Sum[k^2 x^Prime[k]/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    a[n_] := Plus @@ (PrimePi[#[[1]]]^2 & /@ FactorInteger[n]); Table[a[n], {n, 1, 75}]

Formula

G.f.: Sum_{k>=1} k^2 * x^prime(k) / (1 - x^prime(k)).
If n = Product (p_j^k_j) then a(n) = Sum (pi(p_j)^2), where pi = A000720.
Showing 1-10 of 13 results. Next