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.

A007896 Psi_c(n), where Product_{k>1} 1/(1-1/k^s)^phi(k) = Sum_{k>0} psi_c(k)/k^s.

Original entry on oeis.org

1, 1, 2, 3, 4, 4, 6, 7, 9, 8, 10, 12, 12, 12, 16, 18, 16, 19, 18, 24, 24, 20, 22, 32, 30, 24, 34, 36, 28, 40, 30, 42, 40, 32, 48, 60, 36, 36, 48, 64, 40, 60, 42, 60, 76, 44, 46, 86, 63, 66, 64, 72, 52, 82, 80, 96, 72, 56, 58, 128, 60, 60, 114, 104, 96, 100
Offset: 1

Views

Author

Felix Weinstein (wain(AT)ana.unibe.ch)

Keywords

Comments

Phi(k) is the Euler totient function A000010.

Examples

			The left-hand side (a Dirichlet generating function) is
1/((1-1/2^s)*(1-1/3^s)^2*(1-1/4^s)^2*(1-1/5^s)^4*(1-1/6^s)^2*(1-1/7^s)^6* ...)
= 1 + 1/2^s + 2/3^s + 3/4^s + 4/5^s + 4/6^s + 6/7^s + 7/8^s + 9/9^s + ...,
whose coefficients are 1, 1, 2, 3, 4, 4, 6, 7, 9, ... . - _N. J. A. Sloane_, May 26 2014
G.f. = x + x^2 + 2*x^3 + 3*x^4 + 4*x^5 + 4*x^6 + 6*x^7 + 7*x^8 + 9*x^9 + ...
		

References

  • Felix Weinstein, The Fibonacci Partitions, preprint, 1995

Crossrefs

Programs

  • Mathematica
    dircon[v_, w_] := Module[{lv = Length[v], lw = Length[w], fv, fw}, fv[n_] := If[n <= lv, v[[n]], 0]; fw[n_] := If[n <= lw, w[[n]], 0]; Table[ DirichletConvolve[fv[n], fw[n], n, m], {m, Min[lv, lw]}]];
    a[n_] := Module[{A, v, w, m}, If[n<1, 0, v = Table[Boole[k == 1], {k, n}]; For[k = 2, k <= n, k++, m = Length[IntegerDigits[n, k]] - 1; A = (1 - x)^-EulerPhi[k] + x*O[x]^m // Normal; w = Table[0, {n}]; For[i = 0, i <= m, i++, w[[k^i]] = Coefficient[A, x, i]]; v = dircon[v, w]]; v[[n]]]];
    Array[a, 66] (* Jean-François Alcover, Nov 12 2018, from PARI *)
  • PARI
    {a(n) = my(A, v, w, m); if( n<1, 0, v = vector(n, k, k==1); for(k=2, n, m = #digits(n, k) - 1; A = (1 - x)^ -eulerphi(k) + x * O(x^m); w = vector(n); for(i=0, m, w[k^i] = polcoeff(A, i)); v = dirmul(v, w)); v[n])}; /* Michael Somos, May 26 2014 */

Extensions

Definition corrected by Felix Weinstein (wain(AT)ana.unibe.ch), May 14 2014

A007897 a(n) is multiplicative with a(2) = 1; a(4) = 2; a(2^i) = 2^(i-2)+2 if i>2; a(p^i) = 1+(p-1)*p^(i-1)/2 if prime p>2 and i>0.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 4, 4, 4, 3, 6, 4, 7, 4, 6, 6, 9, 4, 10, 6, 8, 6, 12, 8, 11, 7, 10, 8, 15, 6, 16, 10, 12, 9, 12, 8, 19, 10, 14, 12, 21, 8, 22, 12, 12, 12, 24, 12, 22, 11, 18, 14, 27, 10, 18, 16, 20, 15, 30, 12, 31, 16, 16, 18, 21, 12, 34, 18, 24, 12, 36, 16, 37, 19, 22, 20, 24, 14, 40, 18, 28
Offset: 1

Views

Author

Felix Weinstein (wain(AT)ana.unibe.ch), Dec 11 1999

Keywords

Comments

From Jeffrey Shallit, Jun 14 2018: (Start)
Except for first term, the same as A180783.
Equal to the number of elements x relatively prime to n such that x mod n >= x^(-1) mod n. (End)

Examples

			G.f. = x + x^2 + 2*x^3 + 2*x^4 + 3*x^5 + 2*x^6 + 4*x^7 + 4*x^8 + 4*x^9 + ...
		

References

  • Felix Weinstein, The Fibonacci Partitions, preprint, 1995.

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 2, Boole[ n == 1],Times @@ Apply[ Function[ {p, e}, If[p == 2, If[e < 3, e, 2^(e - 2) + 2], 1 + p^(e - 1) (p - 1)/2]], FactorInteger @ n, 1]]; (* Michael Somos, May 26 2014 *)
  • PARI
    ap(p, e) = if (p==2, if (e==1, 1, if (e==2, 2, 2^(e-2)+2)), 1+(p-1)*p^(e-1)/2);
    a(n) = { my(f = factor(n)); prod(i=1, #f~, ap(f[i,1], f[i, 2]));} \\ Michel Marcus, Apr 19 2014
    
  • PARI
    {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); prod( k=1, matsize(A)[1], if( p = A[k,1], e = A[k,2]; if( p==2, if( e<3, e, 2^(e-2) + 2), 1 + p^(e-1) * (p-1) / 2))))}; /* Michael Somos, May 26 2014 */
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p = 2, n, if( p>2, 1 / (1 - X) + (p - 1) / 2 * X / (1 - p*X), (1 + X^2) / (1 - X) + p * X^3 / (1 - p*X))) [n])}; /* Michael Somos, May 26 2014 */

Formula

Dirichlet g.f.: zeta(s) * zeta(s-1) * ((2 - 2^(s+2) + 2^(2*s+1) - 1/2^(2*s-2))/(2^(2*s+1) - 3*2^s - 1)) * Product_{p prime} (1 - (1/p^(s-1) + 1/p^s - 1/p^(2*s-1) + 1/p^(2*s))/2). - Amiram Eldar, Nov 09 2023

Extensions

Definition corrected by Michel Marcus, Apr 19 2014
Changed name from phi(n) (which caused much confusion with the Euler phi-function) to a(n). - N. J. A. Sloane, May 26 2014

A175378 G.f. x^4*(2*x^2-1)/( (x^2-1)*(x^2+x-1)*(2*x^3-2*x^2+2*x-1) ).

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 5, 8, 14, 26, 45, 75, 125, 212, 358, 598, 993, 1651, 2745, 4552, 7526, 12426, 20501, 33787, 55605, 91404, 150118, 246350, 403929, 661763, 1083393, 1772512, 2898182, 4735938, 7734765, 12626059, 20600733, 33597188, 54769606
Offset: 0

Views

Author

R. J. Mathar, Apr 24 2010

Keywords

Crossrefs

Programs

  • Magma
    I:=[0, 0, 0, 0, 1, 3, 5]; [n le 7 select I[n] else 3*Self(n-1) - 2*Self(n-2) - Self(n-3) + 3*Self(n-4) - 4*Self(n-5) + 2*Self(n-7): n in [1..40]]; // Vincenzo Librandi, Dec 20 2012
  • Mathematica
    LinearRecurrence[{3,-2,-1,3,-4,0,2},{0,0,0,0,1,3,5},40] (* Harvey P. Dale, Mar 07 2012 *)
    CoefficientList[Series[x^4*(2*x^2 - 1)/((x^2 - 1)*(x^2 + x - 1)*(2*x^3 - 2*x^2 + 2*x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 20 2012 *)

Formula

a(n) = 3*a(n-1) -2*a(n-2) -a(n-3) +3*a(n-4) -4*a(n-5) +2*a(n-7).
Showing 1-3 of 3 results.