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.

A020515 a(n) = 4^n - 2^n + 1.

Original entry on oeis.org

1, 3, 13, 57, 241, 993, 4033, 16257, 65281, 261633, 1047553, 4192257, 16773121, 67100673, 268419073, 1073709057, 4294901761, 17179738113, 68719214593, 274877382657, 1099510579201, 4398044413953, 17592181850113, 70368735789057, 281474959933441, 1125899873288193
Offset: 0

Views

Author

Keywords

Comments

6th cyclotomic polynomial evaluated at powers of 2.
Referred to as Kasami-Welch numbers by Aubry et al. (see links). - Jonathan Vos Post, Sep 15 2009

Crossrefs

Programs

  • Magma
    [4^n - 2^n + 1: n in [0..40]]; // Vincenzo Librandi, Apr 25 2011
    
  • Maple
    with(numtheory,cyclotomic):seq(cyclotomic(6,2**i),i=0..24);
  • Mathematica
    Array[4^# - 2^# + 1 &, 30, 0] (* or *)
    Cyclotomic[6, 2^Range[0, 29]] (* Paolo Xausa, Apr 02 2024 *)
    LinearRecurrence[{7,-14,8},{1,3,13},30] (* Harvey P. Dale, Aug 24 2024 *)
  • PARI
    a(n)=4^n-2^n+1 \\ Charles R Greathouse IV, Jul 02 2013
    
  • Python
    def A020515(n): return (1<Chai Wah Wu, Mar 11 2025

Formula

From Mohammad K. Azarian, Jan 15 2009: (Start)
G.f.: 1/(1-4*x) - 1/(1-2*x) + 1/(1-x).
E.g.f.: e^(4*x) - e^(2*x) + e^x. (End)
a(n) = A002061(A000079(n)). - Michel Marcus, Apr 06 2016