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.

A284413 Exponent of 3 in 2^n + 1.

Original entry on oeis.org

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

Views

Author

Jon E. Schoenfield, Mar 26 2017

Keywords

Comments

Records: a(3^(n-1)) = n and a(k) < n for k < 3^(n-1).
Multiplicative because A051064 is. - Andrew Howroyd, Jul 28 2018

Examples

			a(27) = 4 because 2^27 + 1 = 134217729 = 3^4 * 19 * 87211.
		

Crossrefs

Cf. A051064, A168570 (exponent of 3 in 2^n - 1).

Programs

  • Magma
    [IsEven(n) select 0 else Factorization(3*n)[1][2]: n in [1..87]];
    
  • Mathematica
    Table[If[OddQ[n], IntegerExponent[3n, 3], 0], {n, 100}] (* Indranil Ghosh, Mar 27 2017 *)
  • PARI
    a(n) = if(n%2, if(n<1, 0, 1 + valuation(n, 3)), 0); \\ Indranil Ghosh, Mar 27 2017

Formula

a(n) = A051064(n) if n is odd, 0 otherwise.
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/2. - Amiram Eldar, Sep 11 2020
From Amiram Eldar, Dec 27 2022: (Start)
Multiplicative with a(2^e) = 0, a(3^e) = e+1, and a(p^e) = 1 if p >= 5.
Dirichlet g.f.: zeta(s)*(1-1/2^s)/(1-1/3^s). (End)