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.

A115069 a(n) = 3^b(n), where b(n) is #{primes p=1 mod 3 dividing n}.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 3, 1, 3, 1, 1, 3, 1, 1, 1, 3, 1, 3, 3, 3, 1, 1, 3, 3, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 1, 3, 3, 3, 1, 3, 1, 3, 1, 1, 3, 1, 1, 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 9, 1, 3, 1, 3, 1, 3, 3, 1
Offset: 1

Views

Author

Steven Finch, Mar 01 2006

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> 3^add(`if`(irem(i[1], 3)=1, 1, 0), i=ifactors(n)[2](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Feb 17 2019
  • Mathematica
    b[n_] := Count[FactorInteger[n][[All, 1]], p_ /; Mod[p, 3] == 1];
    a[1] = 1; a[n_] := 3^b[n];
    Table[a[n], {n, 1, 99}] (* Jean-François Alcover, Feb 17 2019 *)
  • PARI
    a(n) = 3^#select(x -> x%3 == 1, factor(n)[,1]); \\ Amiram Eldar, Nov 30 2024

Formula

a(n) = 3^A005088(n). - R. J. Mathar, May 19 2020
From Amiram Eldar, Nov 30 2024: (Start)
Multiplicative with a(p^e) = 3 if p == 1 (mod 3), and 1 otherwise.
Sum_{k=1..n} a(k) ~ (sqrt(3)/(2*Pi)) * c * n * log(n), where c = Product_{primes p == 1 (mod 3)} (1 - 2/(p*(p+1))) = 0.9410349413195354517900322... (Finch and Sebah, 2006). (End)

Extensions

a(1)=1 prepended by Alois P. Heinz, Feb 17 2019
Keyword mult added by Amiram Eldar, Nov 30 2024