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

A195017 If n = Product_{k >= 1} (p_k)^(c_k) where p_k is k-th prime and c_k >= 0 then a(n) = Sum_{k >= 1} c_k*((-1)^(k-1)).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Feb 06 2012

Keywords

Comments

Let p(n,x) be the completely additive polynomial-valued function such that p(1,x) = 0 and p(prime(n),x) = x^(n-1), like is defined in A206284 (although here we are not limited to just irreducible polynomials). Then a(n) is the value of the polynomial encoded in such a manner by n, when it is evaluated at x=-1. - The original definition rewritten and clarified by Antti Karttunen, Oct 03 2018
Positions of 0 give the values of n for which the polynomial p(n,x) is divisible by x+1. For related sequences, see the Mathematica section.
Also the number of odd prime indices of n minus the number of even prime indices of n (both counted with multiplicity), where a prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798. - Gus Wiseman, Oct 24 2023

Examples

			The sequence can be read from a list of the polynomials:
  p(n,x)      with x = -1, gives a(n)
------------------------------------------
  p(1,x) = 0           0
  p(2,x) = 1x^0        1
  p(3,x) = x          -1
  p(4,x) = 2x^0        2
  p(5,x) = x^2         1
  p(6,x) = 1+x         0
  p(7,x) = x^3        -1
  p(8,x) = 3x^0        3
  p(9,x) = 2x         -2
  p(10,x) = x^2 + 1    2.
(The list runs through all the polynomials whose coefficients are nonnegative integers.)
		

Crossrefs

For other evaluation functions of such encoded polynomials, see A001222, A048675, A056239, A090880, A248663.
Zeros are A325698, distinct A325700.
For sum instead of count we have A366749 = A366531 - A366528.
A000009 counts partitions into odd parts, ranked by A066208.
A035363 counts partitions into even parts, ranked by A066207.
A112798 lists prime indices, reverse A296150, sum A056239.
A257991 counts odd prime indices, even A257992.
A300061 lists numbers with even sum of prime indices, odd A300063.

Programs

  • Mathematica
    b[n_] := Table[x^k, {k, 0, n}];
    f[n_] := f[n] = FactorInteger[n]; z = 200;
    t[n_, m_, k_] := If[PrimeQ[f[n][[m, 1]]] && f[n][[m, 1]]
    == Prime[k], f[n][[m, 2]], 0];
    u = Table[Apply[Plus,
        Table[Table[t[n, m, k], {k, 1, PrimePi[n]}], {m, 1,
          Length[f[n]]}]], {n, 1, z}];
    p[n_, x_] := u[[n]].b[-1 + Length[u[[n]]]]
    Table[p[n, x] /. x -> 0, {n, 1, z/2}]   (* A007814 *)
    Table[p[2 n, x] /. x -> 0, {n, 1, z/2}] (* A001511 *)
    Table[p[n, x] /. x -> 1, {n, 1, z}]     (* A001222 *)
    Table[p[n, x] /. x -> 2, {n, 1, z}]     (* A048675 *)
    Table[p[n, x] /. x -> 3, {n, 1, z}]     (* A090880 *)
    Table[p[n, x] /. x -> -1, {n, 1, z}]    (* A195017 *)
    z = 100; Sum[-(-1)^k IntegerExponent[Range[z], Prime[k]], {k, 1, PrimePi[z]}] (* Friedjof Tellkamp, Aug 05 2024 *)
  • PARI
    A195017(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * (-1)^(1+primepi(f[i,1])))); } \\ Antti Karttunen, Oct 03 2018

Formula

Totally additive with a(p^e) = e * (-1)^(1+PrimePi(p)), where PrimePi(n) = A000720(n). - Antti Karttunen, Oct 03 2018
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} = (-1)^(primepi(p)+1)/(p-1) = Sum_{k>=1} (-1)^(k+1)/A006093(k) = A078437 + Sum_{k>=1} (-1)^(k+1)/A036689(k) = 0.6339266524059... . - Amiram Eldar, Sep 29 2023
a(n) = A257991(n) - A257992(n). - Gus Wiseman, Oct 24 2023
a(n) = -Sum_{k=1..pi(n)} (-1)^k * valuation(n, prime(k)). - Friedjof Tellkamp, Aug 05 2024

Extensions

More terms, name changed and example-section edited by Antti Karttunen, Oct 03 2018

A222171 Decimal expansion of Pi^2/24.

Original entry on oeis.org

4, 1, 1, 2, 3, 3, 5, 1, 6, 7, 1, 2, 0, 5, 6, 6, 0, 9, 1, 1, 8, 1, 0, 3, 7, 9, 1, 6, 6, 1, 5, 0, 6, 2, 9, 7, 3, 0, 4, 7, 3, 7, 4, 7, 5, 3, 0, 1, 6, 9, 9, 6, 0, 9, 4, 3, 3, 8, 8, 9, 5, 5, 7, 3, 4, 2, 5, 0, 1, 8, 6, 7, 6, 0, 0, 8, 0, 0, 2, 1, 8, 4, 5, 8, 4, 0, 7, 2, 2, 5, 1, 5, 4, 9, 3, 9, 6, 7, 6, 3
Offset: 0

Views

Author

Jean-François Alcover, May 13 2013

Keywords

Examples

			0.411233516712056609118103791661506297304737475301699609433889557342501867600...
		

References

  • George Boros and Victor H. Moll, Irresistible integrals, Cambridge University Press, 2006, p. 242.
  • Ovidiu Furdui, Limits, Series, and Fractional Part Integrals: Problems in Mathematical Analysis, New York: Springer, 2013. See Problem 3.45, p. 158 and 199-200.

Crossrefs

Programs

  • Magma
    pi:=Pi(RealField(110)); Reverse(Intseq(Floor(10^100*(pi)^2/24))); // Vincenzo Librandi, Sep 25 2015
    
  • Mathematica
    RealDigits[Pi^2/24, 10, 100] // First
  • PARI
    Pi^2/24 \\ Michel Marcus, Dec 10 2020

Formula

Equals Integral_{x=0..Pi/2} log(sec(x))/tan(x) dx.
Equals Sum_{k >= 1} 1/(2k)^2. - Geoffrey Critzer, Nov 02 2013
Equals (1/10) * Sum_{k>=1} d(k^2)/k^2, where d(k) is the number of divisors of k (A000005). - Amiram Eldar, Jun 27 2020
Equals Sum_{n >= 0} 1/((2*n+1)*(6*n+3)). - Peter Bala, Feb 02 2022
Equals Sum_{n>=0} ((-1)^n * (Sum_{k>=n+1} (-1)^k/k)^2) (Furdui, 2013). - Amiram Eldar, Mar 26 2022
Equals Sum_{n>=1} A369180(n)/n^2. - Friedjof Tellkamp, Jan 23 2025

Extensions

Leading 0 term removed (to make offset correct) by Rick L. Shepherd, Jan 01 2014

A309891 a(n) is the total number of trailing zeros in the representations of n over all bases b >= 2.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 1, 5, 3, 3, 1, 6, 1, 3, 3, 8, 1, 6, 1, 6, 3, 3, 1, 9, 3, 3, 5, 6, 1, 7, 1, 10, 3, 3, 3, 11, 1, 3, 3, 9, 1, 7, 1, 6, 6, 3, 1, 13, 3, 6, 3, 6, 1, 9, 3, 9, 3, 3, 1, 12, 1, 3, 6, 14, 3, 7, 1, 6, 3, 7, 1, 15, 1, 3, 6, 6, 3, 7, 1, 13, 8, 3, 1, 12
Offset: 1

Views

Author

Rémy Sigrist, Aug 21 2019

Keywords

Comments

a(n) depends only on the prime signature of n.
a(n) is the sum of the k-adic valuations of n for k >= 2. - Friedjof Tellkamp, Jan 25 2025

Examples

			For n = 12: 12 has 2 trailing zeros in base 2 (1100), 1 trailing zero in bases 3, 4, 6 and 12 (110, 30, 20, 10) and no trailing zero in other bases, hence a(12) = 1*2 + 4*1 = 6.
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, IntegerExponent[n, #] &, # > 1 &], {n, 84}] (* Jon Maiga, Aug 25 2019 *)
  • PARI
    a(n) = sumdiv(n, d, if (d>1, valuation(n,d), 0))
    
  • PARI
    a(n) = {if(n == 1, return(0)); my(f = factor(n)[, 2], res = 0, t = 2, of = f, nf = f >> 1, nd(v) = prod(i = 1, #v, v[i] + 1)); while(Set(of) != [0], res += (nd(of) - nd(nf)) * (t-1); of = nf; t++; nf = f \ t); res} \\ David A. Corneth, Aug 22 2019

Formula

a(n) = Sum_{d|n, d>1} A286561(n,d), where A286561 gives the d-valuation of n.
a(p) = 1 for any prime number p.
a(p^k) = A006218(k) for any k >= 0 and any prime number p.
a(n) = 2^A001221(n) - 1 for any squarefree number n.
a(n) = 3 for any semiprime number n.
a(m*n) >= a(m) + a(n).
a(n) >= A007814(n) + A007949(n) + A235127(n) + A112765(n) + A122841(n) + A214411(n) + A244413(n).
a(n) = A056239(A293514(n)). - Antti Karttunen, Aug 22 2019
a(n) <= A033093(n). - Michel Marcus, Aug 22 2019
a(n) = A169594(n) - 1. - Jon Maiga, Aug 25 2019
From Friedjof Tellkamp, Feb 27 2024: (Start)
G.f.: Sum_{k>=2, j>=1} x^(k^j)/(1-x^(k^j)).
Dirichlet g.f.: zeta(s) * Sum_{k>=1} (zeta(k*s) - 1).
Sum_{n>=1} a(n)/n^2 = Pi^2/8 (A111003). (End)
Showing 1-3 of 3 results.