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.

A088439 a(3n) = 3n, otherwise a(n) = 1.

Original entry on oeis.org

0, 1, 1, 3, 1, 1, 6, 1, 1, 9, 1, 1, 12, 1, 1, 15, 1, 1, 18, 1, 1, 21, 1, 1, 24, 1, 1, 27, 1, 1, 30, 1, 1, 33, 1, 1, 36, 1, 1, 39, 1, 1, 42, 1, 1, 45, 1, 1, 48, 1, 1, 51, 1, 1, 54, 1, 1, 57, 1, 1, 60, 1, 1, 63, 1, 1, 66, 1, 1, 69, 1, 1, 72, 1, 1, 75, 1, 1, 78, 1, 1, 81, 1, 1, 84, 1, 1, 87, 1, 1, 90, 1, 1
Offset: 0

Views

Author

Roger L. Bagula, Nov 09 2003

Keywords

Crossrefs

Programs

  • Magma
    [n mod 3 eq 0 select n else 1: n in [0..100]];  // Bruno Berselli, Mar 11 2011
    
  • Mathematica
    Table[If[Divisible[n,3],n,1],{n,0,100}] (* or *) LinearRecurrence[ {0,0,2,0,0,-1},{0,1,1,3,1,1},100] (* Harvey P. Dale, Jun 18 2018 *)
  • SageMath
    def A088439(n): return 1 if (n%3) else n
    [A088439(n) for n in range(121)] # G. C. Greubel, Dec 05 2022

Formula

From Bruno Berselli, Mar 11 2011: (Start)
G.f.: x*(1+x+3*x^2-x^3-x^4)/(1-x^3)^2.
a(n) = n^A079978(n).
a(n) = 3*A175676(n-1) + A011655(n) for n>0. (End)
E.g.f.: (1/3)*(x+2)*exp(x) - (2/3)*exp(-x/2)*( cos(sqrt(3)*x/2) + x*sin((Pi + 3*sqrt(3)*x)/6) ). - G. C. Greubel, Dec 05 2022