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 33 results. Next

A337395 a(n) is the largest exponent k such that the sums, with multiplicity, of the i-th powers of the prime factors of A100118(n) are all prime for i=1 to k.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 9, 1, 1, 4, 1, 1, 1, 1, 3, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Torlach Rush, Aug 25 2020

Keywords

Examples

			a(4) = 2 because (2^1) + (3^1) = 5 and (2^2) + (3^2) = 13.
a(6) = 2 because (2^1) + (5^1) = 7 and (2^2) + (5^2) = 29.
a(8) = 6 because (2^1) + (2^1) + (3^1) = 7 and (2^2) + (2^2) + (3^2) = 17 and (2^3) + (2^3) + (3^3) = 43 and (2^4) + (2^4) + (3^4) = 113 and (2^5) + (2^5) + (3^5) = 307 and (2^6) + (2^6) + (3^6) = 857.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(f=factor(n), x = 1, y = 1); while(y, if(isprime(sum(i=1, #f~, f[i, 1]^x*f[i, 2])), x++, y = 0)); return(x - 1)}
    for (n = 2, 220, if(a(n) > 0, print1(a(n), ", ")))

A316524 Signed sum over the prime indices of n.

Original entry on oeis.org

0, 1, 2, 0, 3, -1, 4, 1, 0, -2, 5, 2, 6, -3, -1, 0, 7, 1, 8, 3, -2, -4, 9, -1, 0, -5, 2, 4, 10, 2, 11, 1, -3, -6, -1, 0, 12, -7, -4, -2, 13, 3, 14, 5, 3, -8, 15, 2, 0, 1, -5, 6, 16, -1, -2, -3, -6, -9, 17, -1, 18, -10, 4, 0, -3, 4, 19, 7, -7, 2, 20, 1, 21, -11, 2, 8, -1, 5, 22, 3, 0, -12, 23, -2, -4, -13, -8, -4, 24
Offset: 1

Views

Author

Gus Wiseman, Jul 05 2018

Keywords

Comments

If n = prime(x_1) * prime(x_2) * prime(x_3) * ... * prime(x_k) then a(n) = x_1 - x_2 + x_3 - ... + (-1)^(k-1) x_k, where the x_i are weakly increasing positive integers.
The value of a(n) depends only on the squarefree part of n, A007913(n). - Antti Karttunen, May 06 2022

Crossrefs

Cf. A027746, A112798, A119899 (positions of negative terms).
Cf. A344616 (absolute values), A344617 (signs).

Programs

  • Mathematica
    Table[Sum[Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]][[k]]*(-1)^(k-1),{k,PrimeOmega[n]}],{n,100}]
  • PARI
    a(n) = {my(f = factor(n), vp = []); for (k=1, #f~, for( j=1, f[k,2], vp = concat (vp, primepi(f[k,1])));); sum(k=1, #vp, vp[k]*(-1)^(k+1));} \\ Michel Marcus, Jul 06 2018
    
  • Python
    from sympy import factorint, primepi
    def A316524(n):
        fs = [primepi(p) for p in factorint(n,multiple=True)]
        return sum(fs[::2])-sum(fs[1::2]) # Chai Wah Wu, Aug 23 2021

Formula

a(n) = A344616(n) * A344617(n) = a(A007913(n)). - Antti Karttunen, May 06 2022

Extensions

More terms from Antti Karttunen, May 06 2022

A300061 Heinz numbers of integer partitions of even numbers.

Original entry on oeis.org

1, 3, 4, 7, 9, 10, 12, 13, 16, 19, 21, 22, 25, 27, 28, 29, 30, 34, 36, 37, 39, 40, 43, 46, 48, 49, 52, 53, 55, 57, 61, 62, 63, 64, 66, 70, 71, 75, 76, 79, 81, 82, 84, 85, 87, 88, 89, 90, 91, 94, 100, 101, 102, 107, 108, 111, 112, 113, 115, 116, 117, 118, 120
Offset: 1

Views

Author

Gus Wiseman, Feb 23 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			75 is the Heinz number of (3,3,2), which has even weight, so 75 belongs to the sequence.
Sequence of even-weight partitions begins: () (2) (1,1) (4) (2,2) (3,1) (2,1,1) (6) (1,1,1,1) (8) (4,2) (5,1) (3,3) (2,2,2) (4,1,1).
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local k; for k from 1+
         `if`(n=1, 0, a(n-1)) while add(numtheory[pi]
          (i[1])*i[2], i=ifactors(k)[2])::odd do od; k
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, May 22 2018
  • Mathematica
    Select[Range[200],EvenQ[Total[Cases[FactorInteger[#],{p_,k_}:>k*PrimePi[p]]]]&]

A133910 Period numbers of A133900 divided by n^2.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 6, 1, 4, 3, 1, 1, 8, 1, 4, 3, 8, 1, 6, 1, 8, 1, 4, 1, 360, 1, 1, 9, 16, 5, 24, 1, 16, 9, 20, 1, 144, 1, 8, 15, 16, 1, 18, 1, 16, 9, 8, 1, 16, 5, 28, 9, 16, 1, 360, 1, 16, 21, 1, 5, 288, 1, 16, 9, 1120, 1, 24, 1, 32, 9, 16, 7, 288, 1, 20, 1, 64, 1, 6048, 5, 32, 27, 8
Offset: 1

Views

Author

Hieronymus Fischer, Oct 20 2007

Keywords

Examples

			a(6)=2, since A133900(6)/6^2=72/36=2.
a(18)=8, since A133900(18)/18^2=2592/324=8.
		

Crossrefs

Formula

a(n)=A133900(n)/n^2.
a(n)=1, iff n is a prime or a power of a prime (including n=1).
If a prime p is a factor of a(n), then p is also a factor of n.

A316523 Number of odd multiplicities minus number of even multiplicities in the canonical prime factorization of n.

Original entry on oeis.org

0, 1, 1, -1, 1, 2, 1, 1, -1, 2, 1, 0, 1, 2, 2, -1, 1, 0, 1, 0, 2, 2, 1, 2, -1, 2, 1, 0, 1, 3, 1, 1, 2, 2, 2, -2, 1, 2, 2, 2, 1, 3, 1, 0, 0, 2, 1, 0, -1, 0, 2, 0, 1, 2, 2, 2, 2, 2, 1, 1, 1, 2, 0, -1, 2, 3, 1, 0, 2, 3, 1, 0, 1, 2, 0, 0, 2, 3, 1, 0, -1, 2, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Jul 05 2018

Keywords

Crossrefs

Cf. A187039 (where a(n)=0). - Michel Marcus, Jul 08 2018

Programs

  • Maple
    f:= proc(n) local F;
      F:= map(t -> t[2],ifactors(n)[2]);
      2*nops(select(type,F,odd))-nops(F);
    end proc:
    map(f, [$1..100]); # Robert Israel, Aug 27 2018
  • Mathematica
    Table[Total[-(-1)^If[n==1,{},FactorInteger[n][[All,2]]]],{n,100}]
  • PARI
    a(n) = my(f=factor(n)); -sum(k=1, #f~, (-1)^(f[k,2])); \\ Michel Marcus, Jul 08 2018; corrected Jun 13 2022

Formula

If i and j are coprime, a(i*j) = a(i)+a(j). - Robert Israel, Aug 27 2018
From Amiram Eldar, Oct 05 2023: (Start)
Additive with a(p^e) = (-1)^(e+1).
a(n) = A162642(n) - A162641(n).
Sum_{k=1..n} a(k) = n * log(log(n)) + c * n + O(n/log(n)), where c = A077761 - 2*A179119 = -0.398962... . (End)

A134333 Numbers n whose number of prime factors (counted with multiplicity) is a prime factor of n.

Original entry on oeis.org

4, 6, 10, 12, 14, 18, 22, 26, 27, 30, 34, 38, 42, 45, 46, 58, 62, 63, 66, 74, 75, 78, 80, 82, 86, 94, 99, 102, 105, 106, 114, 117, 118, 120, 122, 134, 138, 142, 146, 147, 153, 158, 165, 166, 171, 174, 178, 180, 186, 194, 195, 200, 202, 206, 207, 214, 218, 222, 226
Offset: 1

Views

Author

Hieronymus Fischer, Oct 23 2007

Keywords

Examples

			a(1) = 4, since 4 has 2 prime factors and 2 is a prime factor of 4.
a(4) = 12, since 12 = 2*2*3 has 3 prime factors, and 3 is a prime factor of 12.
a(21) = 75, since 75 = 3*3*5 has 3 prime factors. and 3 is a prime factor of 75.
9 = 3*3 is not a term, since the number of prime factors (=2) is not a divisor of 9.
28 = 2*2*7 is not a term, since the number of prime factors (=3) is not a divisor of 28.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Module[{d = Total[Transpose[FactorInteger[n]][[2]]]}, PrimeQ[d] && Mod[n, d] == 0]; Select[Range[2, 226], fQ] (* T. D. Noe, Apr 05 2013 *)
  • PARI
    a(n)=my(t=bigomega(n)); n%t==0 && isprime(t) \\ Charles R Greathouse IV, Sep 14 2015

Formula

a(n) << n log n/(log log n)^k for any fixed k. - Charles R Greathouse IV, Sep 14 2015

Extensions

Sequence definition corrected and examples added by Hieronymus Fischer, Apr 05 2013

A134344 Composite numbers such that the arithmetic mean of their prime factors (counted with multiplicity) is prime.

Original entry on oeis.org

4, 8, 9, 16, 20, 21, 25, 27, 32, 33, 44, 49, 57, 60, 64, 68, 69, 81, 85, 93, 105, 112, 116, 121, 125, 128, 129, 133, 145, 156, 169, 177, 180, 188, 195, 205, 212, 213, 217, 220, 231, 237, 243, 249, 253, 256, 265, 272, 275, 289, 297, 309, 332, 336, 343, 356, 361
Offset: 1

Views

Author

Hieronymus Fischer, Oct 23 2007

Keywords

Comments

Originally, the definition started with "Nonprime numbers ...". This may be misleading, since 1 is also nonprime, but has no prime factors. - Hieronymus Fischer, May 05 2013

Examples

			a(1) = 4, since 4 = 2*2 and the arithmetic mean (2+2)/2 = 2 is prime.
a(5) = 20, since 20 = 2*2*5 and the arithmetic mean (2+2+5)/3 = 3 is prime.
		

Crossrefs

Programs

  • Mathematica
    ampfQ[n_]:=PrimeQ[Mean[Flatten[Table[#[[1]],{#[[2]]}]&/@FactorInteger[ n]]]]; nn=400;Select[Complement[Range[nn],Prime[Range[ PrimePi[nn]]]], ampfQ] (* Harvey P. Dale, Nov 06 2012 *)
  • PARI
    is(n)=if(n<4,return(0)); my(f=factor(n),s=sum(i=1,#f~,f[i,1]*f[i,2])/sum(i=1,#f~,f[i,2])); (#f~>1 || f[1,2]>1) && denominator(s)==1 && isprime(s) \\ Charles R Greathouse IV, Sep 14 2015

Extensions

Definition clarified by Hieronymus Fischer, May 05 2013

A134376 Numbers whose sum of prime factors (counted with multiplicity) is not prime.

Original entry on oeis.org

1, 4, 8, 9, 14, 15, 16, 18, 20, 21, 24, 25, 26, 27, 30, 32, 33, 35, 36, 38, 39, 42, 44, 46, 49, 50, 51, 55, 57, 60, 62, 64, 65, 66, 68, 69, 70, 72, 74, 77, 78, 81, 84, 85, 86, 87, 91, 92, 93, 94, 95, 98, 100, 102, 105, 106, 110, 111, 112, 114, 115, 116, 119, 120, 121, 122
Offset: 1

Views

Author

Hieronymus Fischer, Oct 23 2007

Keywords

Comments

The first term is 1, since 1 has no prime factors and so the sum of prime factors evaluates to zero.
Conjecture: a(n) ~ n. - Charles R Greathouse IV, Apr 28 2015

Examples

			a(2) = 4, since 4 = 2*2 and 2+2 = 4 is not prime.
a(5) = 14, since 14 = 2*7 and 2+7 = 9 is not prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[150],!PrimeQ[Total[Flatten[Table[#[[1]],#[[2]]]&/@ FactorInteger[ #]]]]&] (* Harvey P. Dale, Jul 05 2021 *)
  • PARI
    sopfr(n)=my(f=factor(n)); sum(i=1,#f~,f[i,1]*f[i,2])
    is(n)=!isprime(sopfr(n)) \\ Charles R Greathouse IV, Apr 28 2015

Extensions

Edited by the author at the suggestion of T. D. Noe, May 20 2013

A046363 Composite numbers whose sum of prime factors (with multiplicity) is prime.

Original entry on oeis.org

6, 10, 12, 22, 28, 34, 40, 45, 48, 52, 54, 56, 58, 63, 75, 76, 80, 82, 88, 90, 96, 99, 104, 108, 117, 118, 136, 142, 147, 148, 153, 165, 172, 175, 176, 184, 198, 202, 207, 210, 214, 224, 245, 248, 250, 252, 268, 273, 274, 279, 294, 296, 298, 300, 316, 320, 325
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Comments

If prime numbers were included the sequence would be 2, 3, 5, 6, 7, 10, 11, 12, 13, 17, 19, 22, 23, 28, 29, ... which is A100118. - Hieronymus Fischer, Oct 20 2007
Conjecture: a(n) can be approximated with the formula c*n^k, where c is approximately 0.46 and k is approximately 1.05. - Elijah Beregovsky, May 01 2019
The ternary Goldbach Conjecture implies that this sequence contains infinitely many terms of A014612 (triprimes). - Elijah Beregovsky, Dec 17 2019
A proof that this sequence is infinite: There are infinitely many odd primes, let p2 > p1 > 2 be two odd primes, p2-p1=2*k then (2^k)*p1 is a term because 2*k+p1=p2 is prime. For example: 5+6=11, 6=2*3, 2^3*5=40 is a term. - Metin Sariyar, Dec 17 2019
Regarding the 2019 conjecture, with k the same, the correct value of "c" is greater than 5, based on data to n = 10^7. - Bill McEachen, Feb 17 2024

Examples

			214 = 2 * 107 -> Sum of factors is 109 -> 109 is prime.
		

Crossrefs

Programs

  • Magma
    f:=func; [k:k in [2..350]| not IsPrime(k) and IsPrime(f(k))]; // Marius A. Burtea, Dec 17 2019
  • Maple
    ifac := proc (n) local L, x: L := ifactors(n)[2]: map(proc (x) options operator, arrow: seq(x[1], j = 1 .. x[2]) end proc, L) end proc: a := proc (n) if isprime(n) = false and isprime(add(t, t = ifac(n))) = true then n else end if end proc: seq(a(n), n = 1 .. 350); # with help from W. Edwin Clark - Emeric Deutsch, Jan 21 2009
  • Mathematica
    PrimeFactorsAdded[n_] := Plus @@ Flatten[Table[ #[[1]]*#[[2]], {1}] & /@ FactorInteger[n]]; GenerateA046363[n_] := Select[Range[n], PrimeQ[PrimeFactorsAdded[ # ]] && PrimeQ[ # ] == False &]; (* GenerateA046363[100] would give all elements of this sequence below 100. - Ryan Witko (witko(AT)nyu.edu), Mar 08 2004 *)
    Select[Range[325], !PrimeQ[#] && PrimeQ[Total[Times@@@FactorInteger[#]]]&] (* Jayanta Basu, May 29 2013 *)
  • PARI
    is(n)=if(isprime(n),return(0)); my(f=factor(n)); isprime(sum(i=1,#f~,f[i,1]*f[i,2])) \\ Charles R Greathouse IV, Sep 21 2013
    

Formula

A100118 INTERSECT A002808. - R. J. Mathar, Sep 09 2015

Extensions

Edited by R. J. Mathar, Nov 02 2009

A056768 Number of partitions of the n-th prime into parts that are all primes.

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 17, 23, 40, 87, 111, 219, 336, 413, 614, 1083, 1850, 2198, 3630, 5007, 5861, 9282, 12488, 19232, 33439, 43709, 49871, 64671, 73506, 94625, 221265, 279516, 394170, 441250, 766262, 853692, 1175344, 1608014, 1975108, 2675925
Offset: 1

Views

Author

Brian Galebach, Aug 16 2000

Keywords

Examples

			a(4) = 3 because the 4th prime is 7 which can be partitioned using primes in 3 ways: 7, 5 + 2, and 3 + 2 + 2.
In connection with the 6th prime 13, for instance, we have the a(6) = 9 prime partitions: 13 = 2 + 2 + 2 + 2 + 2 + 3 = 2 + 2 + 2 + 2 + 5 = 2 + 2 + 2 + 7 = 2 + 2 + 3 + 3 + 3 = 2 + 3 + 3 + 5 = 2 + 11 = 3 + 3 + 7 = 3 + 5 + 5.
		

Crossrefs

Cf. A000041, A000607, A100118, A276687, A070215 (distinct parts).

Programs

Formula

a(n) = A000607(prime(n)).
a(n) = A168470(n) + 1. - Alonso del Arte, Feb 15 2014, restating the corresponding formula given by R. J. Mathar for A168470.
a(n) = [x^prime(n)] Product_{k>=1} 1/(1 - x^prime(k)). - Ilya Gutkovskiy, Jun 05 2017

Extensions

More terms from James Sellers, Aug 25 2000
Showing 1-10 of 33 results. Next