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

A137851 a(n) = A054525(n) * A061397(n).

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Feb 14 2008

Keywords

Comments

Equals row sums of triangle A143517. - Gary W. Adamson, Aug 22 2008

Examples

			a(4) = -2 = (0, -1, 0, 1) dot (0, 2, 3, 0), where (0, -1, 0, 1) = row 4 of the Möbius triangle A054525 and (0, 2, 3, 0) = the first 4 terms of A061397.
		

Crossrefs

Programs

  • Maple
    A061397 := proc(n) if isprime(n) then n; else 0 ; fi ; end: A054525 := proc(n,k) if n mod k = 0 then numtheory[mobius](n/k); else 0; fi ; end: A137851 := proc(n) local k ; add(A061397(k)* A054525(n,k),k=1..n) ; end: seq(A137851(n),n=1..120) ; # R. J. Mathar, May 23 2008
  • Mathematica
    a[n_] := If[n == 1, 0, With[{p = FactorInteger[n][[All, 1]]}, p*MoebiusMu[n/p] // Total]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jun 13 2023 *)
  • Sage
    def A137851(n):
        return add(d*moebius(n//d) for d in divisors(n) if is_prime(d))
    [A137851(n) for n in (1..88)] # Peter Luschny, Feb 01 2012

Formula

A054525 * A061397 = Möbius transform of [0, 2, 3, 0, 5, 0, 7, 0, 0, 0, 11, 0, 13, ...].
Dirichlet g.f.: primezeta(s-1)/zeta(s). - Benedict W. J. Irwin, Jul 11 2018
a(n) = Sum_{p|n} p*mu(n/p), where p is prime. - Ridouane Oudra, Nov 12 2019

Extensions

More terms from R. J. Mathar, May 23 2008

A142971 Triangle read by rows: A061397 with negative signs interleaved with (k-1) zeros.

Original entry on oeis.org

0, -2, 0, -3, 0, 0, 0, -2, 0, 0, -5, 0, 0, 0, 0, 0, -3, -2, 0, 0, 0, -7, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0, 0, 0, -5, 0, 0, -2, 0, 0, 0, 0, 0, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, -2, 0, 0, 0, 0, 0, 0, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5, 0, -3, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Mats O. Granvik and Gary W. Adamson, Jul 14 2008

Keywords

Comments

Except for the first term, row products are given by A062953.

Examples

			Table begins:
0;
-2, 0;
-3, 0, 0;
0,-2, 0, 0;
-5, 0, 0, 0, 0;
0,-3,-2, 0, 0, 0;
-7, 0, 0, 0, 0, 0, 0;
0, 0, 0,-2, 0, 0, 0, 0;
0, 0,-3, 0, 0, 0, 0, 0, 0;
		

Crossrefs

Programs

  • Excel
    =if(mod(row();column())=0;lookup(row()/column();A000027;-A061397);"")

A380118 a(n) = Sum_{k=1..n} (A014963(k) - A061397(k)).

Original entry on oeis.org

1, 1, 1, 3, 3, 4, 4, 6, 9, 10, 10, 11, 11, 12, 13, 15, 15, 16, 16, 17, 18, 19, 19, 20, 25, 26, 29, 30, 30, 31, 31, 33, 34, 35, 36, 37, 37, 38, 39, 40, 40, 41, 41, 42, 43, 44, 44, 45, 52, 53, 54, 55, 55, 56, 57, 58, 59, 60, 60, 61, 61, 62, 63, 65, 66, 67, 67, 68, 69, 70
Offset: 1

Views

Author

Peter Luschny, Jan 30 2025

Keywords

Crossrefs

Programs

  • Maple
    pSum := L -> ListTools:-PartialSums(L): h := n -> n/A048671(n) - n*A010051(n):
    aList := upto -> pSum([seq(h(k), k = 1..upto)]): aList(70);
  • Mathematica
    Accumulate[Table[Exp[MangoldtLambda[n]] - If[PrimeQ[n], n, 0] , {n, 1, 70}]]

Formula

a(n) = A072107(n) - A034387(n). - Amiram Eldar, Jan 30 2025

A143517 Triangle read by rows, A054525 * (A061397 * 0^(n-k)), 1<=k<=n.

Original entry on oeis.org

0, 0, 2, 0, 0, 3, 0, -2, 0, 0, 0, 0, 0, 0, 5, 0, -2, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13
Offset: 1

Views

Author

Gary W. Adamson, Aug 22 2008

Keywords

Comments

Row sums = A137851: (0, 2, 3, -2, 5, -5, 7, 0, -3,...).
Right border = A061397: (0, 2, 3, 0, 5, 0, 7,...).

Examples

			First few rows of the triangle =
0;
0, 2;
0, 0, 3;
0, -2, 0, 0;
0, 0, 0, 0, 5;
0, -2, -3, 0, 0, 0;
0, 0, 0, 0, 0, 0, 7;
...
		

Crossrefs

Formula

Triangle read by rows, A054525 * (A061397 * 0^(n-k)), 1<=k<=n

A143655 Triangle read by rows, primes not dividing n; A054521 * (A061397 * 0^(n-k)), 1<=k<=n.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2, 3, 0, 5, 0, 0, 0, 0, 3, 0, 5, 0, 7, 0, 0, 2, 0, 0, 5, 0, 7, 0, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 2, 3, 0, 5, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 7, 0, 0, 0, 11, 0, 0, 2, 3, 0, 5, 0, 7, 0, 0, 0, 11, 0, 0, 0, 0, 3, 0, 5, 0, 0, 0, 0, 0, 11, 0
Offset: 1

Views

Author

Gary W. Adamson, Aug 28 2008

Keywords

Comments

Row sums = A066911: (0, 0, 2, 3, 5, 5, 10, 15, 14,....)

Examples

			First few rows of the triangle =
0;
0, 0;
0, 2, 0;
0, 0, 3, 0;
0, 2, 3, 0, 0;
0, 0, 0, 0, 5, 0;
0, 2, 3, 0, 5, 0, 0;
0, 0, 3, 0, 5, 0, 7, 0;
...
Row 8 has 3 primes < 8 not dividing 8: (3, 5, 7); where (3 + 5 + 7) = A066911(8).
		

Crossrefs

Formula

Triangle read by rows, A054521 * (A061397 * 0^(n-k)), 1<=k<=n. T(n,k) = prime if k is prime but does not divide n. A054521 = a triangle with row sums phi(n). A061397 = (0, 2, 3, 0, 5, 0, 7,...)

A334768 Self-convolution of A061397.

Original entry on oeis.org

0, 0, 0, 0, 4, 12, 9, 20, 30, 28, 67, 0, 70, 44, 115, 52, 188, 0, 284, 68, 284, 76, 405, 0, 714, 92, 573, 0, 604, 0, 1182, 116, 668, 124, 1271, 0, 1960, 0, 795, 148, 1642, 0, 2680, 164, 1570, 172, 2183, 0, 3974, 188, 3024, 0, 2706, 0, 5354, 212, 2842, 0, 3799
Offset: 0

Views

Author

Lawrence Pepper, May 10 2020

Keywords

Comments

If any term of even index greater than 2 is equal to 0 then the Goldbach conjecture would be disproved.

Crossrefs

Programs

  • Maple
    a:= n-> (f-> add(f(j)*f(n-j), j=0..n))(k-> `if`(isprime(k), k, 0)):
    seq(a(n), n=0..60);  # Alois P. Heinz, May 11 2020
  • Mathematica
    Table[Sum[If[PrimeQ[k], k, 0]*If[PrimeQ[n-k], n-k, 0], {k, 0, n}], {n, 0, 100}] (* Vaclav Kotesovec, May 10 2020 *)
  • PARI
    P(n) = if (isprime(n), n);
    a(n) = sum(k=1, n-1, P(k)*P(n-k)); \\ Michel Marcus, May 10 2020
  • Python
    def a(n):
        A061397 = [0]+[factorial(2*i-1)%(i**2) for i in range(1,n+1)]
        sum = 0
        for i in range(1,n):
            sum += A061397[i] * A061397[n-i]
        return sum
    

Formula

a(n) = Sum_{k=1..n-1} P(k)*P(n-k) where P(k) = A061397(k).

A008472 Sum of the distinct primes dividing n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Sometimes called sopf(n).
Sum of primes dividing n (without repetition) (compare A001414).
Equals A051731 * A061397 = inverse Mobius transform of [0, 2, 3, 0, 5, 0, 7, ...]. - Gary W. Adamson, Feb 14 2008
Equals row sums of triangle A143535. - Gary W. Adamson, Aug 23 2008
a(n) = n if and only if n is prime. - Daniel Forgues, Mar 24 2009
a(n) = n is a new record if and only if n is prime. - Zak Seidov, Jun 27 2009
a(A001043(n)) = A191583(n);
For n > 0: a(A000079(n)) = 2, a(A000244(n)) = 3, a(A000351(n)) = 5, a(A000420(n)) = 7;
a(A006899(n)) <= 3; a(A003586(n)) = 5; a(A033846(n)) = 7; a(A033849(n)) = 8; a(A033847(n)) = 9; a(A033850(n)) = 10; a(A143207(n)) = 10. - Reinhard Zumkeller, Jun 28 2011
For n > 1: a(n) = Sum(A027748(n,k): 1 <= k <= A001221(n)). - Reinhard Zumkeller, Aug 27 2011
If n is the product of twin primes (A037074), a(n) = 2*sqrt(n+1) = sqrt(4n+4). - Wesley Ivan Hurt, Sep 07 2013
From Wilf A. Wilson, Jul 21 2017: (Start)
a(n) + 2, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing mappings on a set with n elements.
a(n) + 3, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing partial mappings on a set with n elements.
(End)
The smallest m such that a(m) = n, or 0 if no such number m exists is A064502(n). The only integers that are not in the sequence are 1, 4 and 6. - Bernard Schott, Feb 07 2022

Examples

			a(18) = 5 because 18 = 2 * 3^2 and 2 + 3 = 5.
a(19) = 19 because 19 is prime.
a(20) = 7 because 20 = 2^2 * 5 and 2 + 5 = 7.
		

Crossrefs

First difference of A024924.
Sum of the k-th powers of the primes dividing n for k=0..10 : A001221 (k=0), this sequence (k=1), A005063 (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

  • Haskell
    a008472 = sum . a027748_row  -- Reinhard Zumkeller, Mar 29 2012
    
  • Magma
    [n eq 1 select 0 else &+[p[1]: p in Factorization(n)]: n in [1..100]]; // Vincenzo Librandi, Jun 24 2017
    
  • Maple
    A008472 := n -> add(d, d = select(isprime, numtheory[divisors](n))):
    seq(A008472(i), i = 1..40); # Peter Luschny, Jan 31 2012
    A008472 := proc(n)
            add( d, d= numtheory[factorset](n)) ;
    end proc: # R. J. Mathar, Jul 08 2012
  • Mathematica
    Prepend[Array[Plus @@ First[Transpose[FactorInteger[#]]] &, 100, 2], 0]
    Join[{0}, Rest[Total[Transpose[FactorInteger[#]][[1]]]&/@Range[100]]] (* Harvey P. Dale, Jun 18 2012 *)
    (* Requires version 7.0+ *) Table[DivisorSum[n, # &, PrimeQ[#] &], {n, 75}] (* Alonso del Arte, Dec 13 2014 *)
    Table[Sum[p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* Vaclav Kotesovec, May 20 2020 *)
  • PARI
    sopf(n) = local(fac=factor(n)); sum(i=1,matsize(fac)[1],fac[i,1])
    
  • PARI
    vector(100,n,vecsum(factor(n)[,1]~)) \\ Derek Orr, May 13 2015
    
  • PARI
    A008472(n)=vecsum(factor(n)[,1]) \\ M. F. Hasler, Jul 18 2015
    
  • Python
    from sympy import primefactors
    def A008472(n): return sum(primefactors(n)) # Chai Wah Wu, Feb 03 2022
  • Sage
    def A008472(n):
        return add(d for d in divisors(n) if is_prime(d))
    print([A008472(i) for i in (1..40)]) # Peter Luschny, Jan 31 2012
    
  • Sage
    [sum(prime_factors(n)) for n in range(1,74)] # Giuseppe Coppoletta, Jan 19 2015
    

Formula

Let n = Product_j prime(j)^k(j) where k(j) >= 1, then a(n) = Sum_j prime(j).
Additive with a(p^e) = p.
G.f.: Sum_{k >= 1} prime(k)*x^prime(k)/(1-x^prime(k)). - Franklin T. Adams-Watters, Sep 01 2009
L.g.f.: -log(Product_{k>=1} (1 - x^prime(k))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 06 2017
Dirichlet g.f.: primezeta(s-1)*zeta(s). - Benedict W. J. Irwin, Jul 11 2018
a(n) = Sum_{p|n, p prime} p. - Wesley Ivan Hurt, Feb 04 2022
From Bernard Schott, Feb 07 2022: (Start)
For n > 0: a(A001020(n)) = 11, a(A001022(n)) = 13, a(A001026(n)) = 17, a(A001029(n)) = 19, a(A009967(n)) = 23, a(A009973(n)) = 29, a(A009975(n)) = 31, a(A009981(n)) = 37, a(A009985(n)) = 41, a(A009987(n)) = 43, a(A009991(n)) = 47.
For p odd prime, a(2*p) = p+2 <==> a(A100484(n)) = A052147(n) for n > 1. (End)
a(n) = Sum_{d|n} d * c(d), where c = A010051. - Wesley Ivan Hurt, Jun 22 2024

A034387 Sum of primes <= n.

Original entry on oeis.org

0, 2, 5, 5, 10, 10, 17, 17, 17, 17, 28, 28, 41, 41, 41, 41, 58, 58, 77, 77, 77, 77, 100, 100, 100, 100, 100, 100, 129, 129, 160, 160, 160, 160, 160, 160, 197, 197, 197, 197, 238, 238, 281, 281, 281, 281, 328, 328, 328, 328, 328, 328, 381, 381, 381, 381, 381
Offset: 1

Views

Author

Keywords

Comments

Also sum of all prime factors in n!.
For large n, these numbers can be closely approximated by the number of primes < n^2. For example, the sum of primes < 10^10 = 2220822432581729238. The number of primes < (10^10)^2 or 10^20 = 2220819602560918840. This has a relative error of 0.0000012743... - Cino Hilliard, Jun 08 2008
Equals row sums of triangle A143537. - Gary W. Adamson, Aug 23 2008
Partial sums of A061397. - Reinhard Zumkeller, Mar 21 2014

Crossrefs

This is a lower bound on A287881.

Programs

  • Haskell
    a034387 n = a034387_list !! (n-1)
    a034387_list = scanl1 (+) a061397_list
    -- Reinhard Zumkeller, Mar 21 2014
    
  • Maple
    a:= proc(n) option remember; `if`(n<1, 0,
          a(n-1)+`if`(isprime(n), n, 0))
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Jun 29 2022
  • Mathematica
    s=0; Table[s=s+n*Boole[PrimeQ[n]],{n,100}] (* Zak Seidov, Apr 11 2011 *)
    Accumulate[Table[If[PrimeQ[n],n,0],{n,60}]] (* Harvey P. Dale, Jul 25 2016 *)
  • PARI
    a(n)=sum(i=1,primepi(n),prime(i)) \\ Michael B. Porter, Sep 22 2009
    
  • PARI
    a=0;for(k=1,100,print1(a=a+k*isprime(k),", ")) \\ Zak Seidov, Apr 11 2011
    
  • PARI
    a(n) = if(n <= 1, return(0)); my(r=sqrtint(n)); my(V=vector(r, k, n\k)); my(L=n\r-1); V=concat(V, vector(L, k, L-k+1)); my(T=vector(#V, k, V[k]*(V[k]+1)\2)); my(S=Map(matrix(#V,2,x,y,if(y==1,V[x],T[x])))); forprime(p=2, r, my(sp=mapget(S,p-1), p2=p*p); for(k=1, #V, if(V[k] < p2, break); mapput(S, V[k], mapget(S,V[k]) - p*(mapget(S,V[k]\p) - sp)))); mapget(S,n)-1; \\ Daniel Suteu, Jun 29 2022
    
  • Python
    from sympy import isprime
    from itertools import accumulate
    def alist(n): return list(accumulate(k*isprime(k) for k in range(1, n+1)))
    print(alist(57)) # Michael S. Branicky, Sep 18 2021

Formula

From the prime number theorem a(n) has the asymptotic expression: a(n) ~ n^2 / (2 log n). - Dan Fux (dan.fux(AT)OpenGaia.com), Apr 07 2001
a(n) = A158662(n) - 1. a(p) - a(p-1) = p, for p = primes (A000040), a(c) - a(c-1) = 0, for c = composite numbers (A002808). - Jaroslav Krizek, Mar 23 2009
a(n) = n^2/(2 log n) + O(n^2 log log n/log^2 n). - Vladimir Shevelev and Charles R Greathouse IV, May 29 2014
Conjecture: G.f.: Sum_{i>0} Sum_{j>=i} Sum_{k>=j|i-j+k is prime} x^k. - Benedict W. J. Irwin, Mar 31 2017
a(n) = (n+1)*A000720(n) - A046992(n). - Ridouane Oudra, Sep 18 2021
a(n) = A007504(A000720(n)). - Ridouane Oudra, Feb 22 2022
a(n) = Sum_{p<=n, p prime} p. - Wesley Ivan Hurt, Dec 31 2023

A089026 a(n) = n if n is a prime, otherwise a(n) = 1.

Original entry on oeis.org

1, 2, 3, 1, 5, 1, 7, 1, 1, 1, 11, 1, 13, 1, 1, 1, 17, 1, 19, 1, 1, 1, 23, 1, 1, 1, 1, 1, 29, 1, 31, 1, 1, 1, 1, 1, 37, 1, 1, 1, 41, 1, 43, 1, 1, 1, 47, 1, 1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 59, 1, 61, 1, 1, 1, 1, 1, 67, 1, 1, 1, 71, 1, 73, 1, 1, 1, 1, 1, 79, 1, 1, 1, 83, 1, 1, 1, 1, 1, 89, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Roger L. Bagula, Nov 12 2003

Keywords

Comments

This sequence was the subject of the 1st problem of the 9th Irish Mathematical Olympiad 1996 with gcd((n + 1)!, n! + 1) = a(n+1) for n >= 0 (see formula Jan 23 2009 and link). - Bernard Schott, Jul 22 2020
For sequence A with terms a(1), a(2), a(3),... , let R(0) = 1 and for k >= 1 let R(k) = rad(a(1)*a(2)*...*a(k)). Define the Rad-transform of A to be R(n)/R(n-1); n >= 1, where rad is A007947. Then this sequence is the Rad transform of the positive integers, A = A000027. - David James Sycamore, Apr 19 2024

Examples

			From Larry Tesler (tesler(AT)pobox.com), Nov 08 2010: (Start)
a(9) = (8*9*10)/(2^((5+2+1)-(3+1+0))*3^((3+1)-(2+0))*5^((2)-(1))*7^((1)-(1))) = 1 [composite].
a(10) = (8*9*10)/(2^((5+2+1)-(3+1+0))*3^((3+1)-(2+0))*5^((2)-(1))*7^((1)-(1))) = 1 [composite].
a(11) = (8*9*10*11*12)/(2^((6+3+1)-(3+1+0))*3^((4+1)-(2+0))*5^((2)-(1))*7^((1)-(1))) = 11 [prime]. (End)
		

References

  • Paulo Ribenboim, The little book of big primes, Springer 1991, p. 106.
  • L. Tesler, "Factorials and Primes", Math. Bulletin of the Bronx H.S. of Science (1961), 5-10. [From Larry Tesler (tesler(AT)pobox.com), Nov 08 2010]

Crossrefs

Differs from A080305 at n=30.

Programs

  • MATLAB
    a = [1:96]; a(isprime(a) == false) = 1; % Thomas Scheuerle, Oct 06 2022
    
  • Magma
    [IsPrime(n) select n else 1: n in [1..96]]; // Marius A. Burtea, Aug 02 2019
    
  • Mathematica
    digits=200; a=Table[If[PrimePi[n]-PrimePi[n-1]>0, n, 1], {n, 1, digits}]; Table[Numerator[(n/2)/(n-1)! ] + Floor[2/n] - 2*Floor[1/n], {n,1,200}] (* Alexander Adamchuk, May 20 2006 *)
    Range@ 120 /. k_ /; CompositeQ@ k -> 1 (* or *)
    Table[n Boole@ PrimeQ@ n, {n, 120}] /. 0 -> 1 (* or *)
    Table[If[PrimeQ@ n, n, 1], {n, 120}] (* Michael De Vlieger, Jul 02 2016 *)
  • PARI
    a(n) = n^isprime(n) \\ David A. Corneth, Oct 06 2022
  • Python
    from sympy import isprime
    def a(n): return n if isprime(n) else 1
    print([a(n) for n in range(1, 97)]) # Michael S. Branicky, Oct 06 2022
    
  • Sage
    def A089026(n):
        if n == 4: return 1
        f = factorial(n-1)
        return (f + 1) - n*(f//n)
    [A089026(n) for n in (1..96)]   # Peter Luschny, Oct 16 2013
    

Formula

From Peter Luschny, Nov 29 2003: (Start)
a(n) = denominator(n! * Sum_{m=0..n} (-1)^m*m!*Stirling2(n+1, m+1)/(m+1)).
a(n) = denominator(n! * Sum_{m=0..n} (-1)^m*m!*Stirling2(n, m)/(m+1)). (End)
From Alexander Adamchuk, May 20 2006: (Start)
a(n) = numerator((n/2)/(n-1)!) + floor(2/n) - 2*floor(1/n).
a(n) = A090585(n-1) = A000217(n-1)/A069268(n-1) for n>2. (End)
a(n) = gcd(n,(n-1)!+1). - Jaume Oliver Lafont, Jul 17 2008, Jan 23 2009
a(1) = 1, a(2) = 2, then a(n) = 1 or a(n) = n = prime(m) = (Product q+k, k = 1 .. 2*floor(n/2+1)-q) / (Product prime(i)^(Sum (floor((n+1)/(prime(i)^w)) - floor(q/(prime(i)^w)) ), w = 1 .. floor(log[base prime(i)] n+1) ), i = 2 .. m-1) where q = prime(m-1). - Larry Tesler (tesler(AT)pobox.com), Nov 08 2010
a(n) = (n!*HarmonicNumber(n) mod n)+1, n != 4. - Gary Detlefs, Dec 03 2011
a(n) = denominator of (n!)/n^(3/2). - Arkadiusz Wesolowski, Dec 04 2011
a(n) = A034386(n+1)/A034386(n). - Eric Desbiaux, May 10 2013
a(n) = n^c(n), where c = A010051. - Wesley Ivan Hurt, Jun 16 2013
a(n) = A014963(n)^(-A008683(n)). - Mats Granvik, Jul 02 2016
Conjecture: for n > 3, a(n) = gcd(n, A007406(n-1)). - Thomas Ordowski, Aug 02 2019
a(n) = 1 + c(n)*(n-1), where c = A010051. - Wesley Ivan Hurt, Jun 21 2025

A046731 a(n) = sum of primes < 10^n.

Original entry on oeis.org

0, 17, 1060, 76127, 5736396, 454396537, 37550402023, 3203324994356, 279209790387276, 24739512092254535, 2220822432581729238, 201467077743744681014, 18435588552550705911377, 1699246443377779418889494, 157589260710736940541561021, 14692398516908006398225702366
Offset: 0

Views

Author

Keywords

Comments

a(21) was already correctly computed by Marc Deleglise in 2009 but in 2011 he withdrew his result because his verification failed. - Kim Walisch, Jun 06 2016

Examples

			The primes less than 10 give 2+3+5+7 = 17.
		

Crossrefs

Cf. A034387.

Programs

  • Mathematica
    Join[{0, s = 17}, Table[Do[If[PrimeQ[i], s += i], {i, 10^n + 1, 10^(n + 1), 2}]; s, {n, 7}]] (* Jayanta Basu, Jun 28 2013 *)
    Table[Sum[Prime[i], {i, PrimePi[10^n]}], {n, 0, 7}]  (* Kim Walisch, Dec 21 2017 *)
  • PARI
    a(n) = my(s=0); forprime(p=1, 10^n, s += p); s; \\ Michel Marcus, Jan 14 2015
    
  • Perl
    use ntheory ":all"; say "$ ",sum_primes(10**$) for 0..15; # Dana Jacobsen, May 04 2017

Formula

a(n) is about 100^n/(n log 100). - Charles R Greathouse IV, Jan 29 2013
a(n) = Sum_{i=2..10^n} A061397(i). - José de Jesús Camacho Medina, Aug 08 2016

Extensions

Corrected and extended by Jud McCranie
a(12) and a(13) from Cino Hilliard, Aug 14 2006
New value for a(13) from Cino Hilliard, Oct 24 2007
There was indeed an error in a(13) both in the entry here and in the b-file. This has now been corrected. - N. J. A. Sloane, Nov 23 2007
Two new values from Marc Deleglise, May 21 2008 - see the b-file.
a(21) from Marc Deleglise, Jun 29 2008 - see the b-file.
Nov 15 2011: Marc Deleglise has withdrawn his value for a(21).
a(21)-a(22) from Kim Walisch, Jun 06 2016
a(23) from Kim Walisch, Jun 11 2016
a(24) from David Baugh using Kim Walisch's primesum program, Jun 17 2016
a(25) from David Baugh using Kim Walisch's primesum program, Oct 16 2016
a(26) from Kim Walisch, May 25 2022, added by Lorenzo Pieri
Showing 1-10 of 40 results. Next