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

A101203 a(n) = sum of nonprimes <= n.

Original entry on oeis.org

0, 1, 1, 1, 5, 5, 11, 11, 19, 28, 38, 38, 50, 50, 64, 79, 95, 95, 113, 113, 133, 154, 176, 176, 200, 225, 251, 278, 306, 306, 336, 336, 368, 401, 435, 470, 506, 506, 544, 583, 623, 623, 665, 665, 709, 754, 800, 800, 848, 897, 947, 998, 1050, 1050, 1104, 1159, 1215
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 23 2005

Keywords

Crossrefs

Partial sums of A191558.

Programs

  • Haskell
    a101203 n = a101203_list !! (n-1)
    a101203_list = scanl (+) 0 $ zipWith (*) [1..] $ map (1 -) a010051_list
    -- Reinhard Zumkeller, Oct 10 2013
  • Mathematica
    Accumulate[Table[If[PrimeQ[n],0,n],{n,0,60}]] (* Harvey P. Dale, Oct 02 2020 *)
  • PARI
    my(s=0); for(k=0,100,if(!isprime(k),s+=k);print1(s", ")); \\ Cino Hilliard, Feb 04 2006
    

Formula

a(n) = A000217(n) - A034387(n) = A101256(n) + 1.

A125071 a(n) = sum of the exponents in the prime factorization of n which are not primes.

Original entry on oeis.org

0, 1, 1, 0, 1, 2, 1, 0, 0, 2, 1, 1, 1, 2, 2, 4, 1, 1, 1, 1, 2, 2, 1, 1, 0, 2, 0, 1, 1, 3, 1, 0, 2, 2, 2, 0, 1, 2, 2, 1, 1, 3, 1, 1, 1, 2, 1, 5, 0, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 6, 2, 3, 1, 1, 2, 3, 1, 0, 1, 2, 1, 1, 2, 3, 1, 5, 4, 2, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 0, 1, 3, 1, 1, 3
Offset: 1

Views

Author

Leroy Quet, Nov 18 2006

Keywords

Examples

			720 has the prime-factorization of 2^4 *3^2 *5^1. Two of these exponents, 4 and 1, aren't primes. So a(720) = 4 + 1 = 5.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ Select[Last /@ FactorInteger[n], ! PrimeQ[ # ] &];Table[f[n], {n, 110}] (* Ray Chandler, Nov 19 2006 *)
  • PARI
    A125071(n) = vecsum(apply(e -> if(isprime(e),0,e), factorint(n)[, 2])); \\ Antti Karttunen, Jul 07 2017

Formula

From Amiram Eldar, Sep 30 2023: (Start)
Additive with a(p^e) = A191558(e).
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B - C), where B is Mertens's constant (A077761) and C = Sum_{p prime} p * (P(p) - P(p+1)) - Sum_{k>=2} P(k) = 0.20171354082810650948..., where P(s) is the prime zeta function. (End)

Extensions

Extended by Ray Chandler, Nov 19 2006

A259175 a(n) = 1 if n prime, otherwise prime(n).

Original entry on oeis.org

2, 1, 1, 7, 1, 13, 1, 19, 23, 29, 1, 37, 1, 43, 47, 53, 1, 61, 1, 71, 73, 79, 1, 89, 97, 101, 103, 107, 1, 113, 1, 131, 137, 139, 149, 151, 1, 163, 167, 173, 1, 181, 1, 193, 197, 199, 1, 223, 227, 229, 233, 239, 1, 251, 257, 263, 269, 271, 1, 281, 1, 293, 307, 311
Offset: 1

Views

Author

Vincenzo Librandi, Jun 20 2015

Keywords

Comments

The subsequence of prime terms is A007821. - Michel Marcus, Jun 20 2015

Examples

			a(7) = 1 because 7 is prime.
a(8) = 19 because 8 is not prime and prime(8) = 19.
		

Crossrefs

Programs

  • Magma
    [IsPrime(n) select 1 else NthPrime(n): n in [1..100]];
  • Mathematica
    Table[If[PrimeQ[n], 1, Prime[n]], {n, 100}]

A272476 a(n) = n if n is prime, a(n) = 2*n+3 otherwise.

Original entry on oeis.org

3, 5, 2, 3, 11, 5, 15, 7, 19, 21, 23, 11, 27, 13, 31, 33, 35, 17, 39, 19, 43, 45, 47, 23, 51, 53, 55, 57, 59, 29, 63, 31, 67, 69, 71, 73, 75, 37, 79, 81, 83, 41, 87, 43, 91, 93, 95, 47, 99, 101, 103, 105, 107, 53, 111, 113, 115, 117, 119, 59, 123, 61, 127
Offset: 0

Views

Author

Vincenzo Librandi, May 02 2016

Keywords

Comments

Prime numbers repeated: 3, 5, 11, 19, 23, 31, 43, 47, 53, 59, 67, 71, ..., that is A065091 without A089531.

Crossrefs

Programs

  • Magma
    [IsPrime(n) select n else 2*n+3: n in [0..80]];
  • Mathematica
    Table[If[PrimeQ[n], n, 2 n + 3], {n, 0, 150}]

A259182 a(n) = prime(n) if n prime otherwise 1.

Original entry on oeis.org

1, 3, 5, 1, 11, 1, 17, 1, 1, 1, 31, 1, 41, 1, 1, 1, 59, 1, 67, 1, 1, 1, 83, 1, 1, 1, 1, 1, 109, 1, 127, 1, 1, 1, 1, 1, 157, 1, 1, 1, 179, 1, 191, 1, 1, 1, 211, 1, 1, 1, 1, 1, 241, 1, 1, 1, 1, 1, 277, 1, 283, 1, 1, 1, 1, 1, 331, 1, 1, 1, 353, 1, 367, 1, 1, 1, 1
Offset: 1

Views

Author

Vincenzo Librandi, Jun 20 2015

Keywords

Comments

The subsequence of prime terms is A006450.

Examples

			a(7) = 17 because prime(7) = 17 is prime.
a(8) = 1 because 8 is not prime.
		

Crossrefs

Programs

  • Magma
    [IsPrime(n) select NthPrime(n) else 1: n in [1..100]];
  • Mathematica
    Table[If[! PrimeQ[n], 1, Prime[n]], {n, 100}]
Showing 1-5 of 5 results.