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-10 of 13 results. Next

A080545 Characteristic function of {1} union {odd primes}: 1 if n is 1 or an odd prime, else 0.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0
Offset: 1

Views

Author

N. J. A. Sloane, Mar 21 2003

Keywords

Examples

			a(2) = 0 because 2 is prime but even.
a(3) = 1 because 3 is prime and odd. Likewise for a(5) and a(7).
a(4) = 0 because 4 is neither prime nor odd. Likewise for a(6) and a(8).
a(9) = 0 because 9 is odd but composite.
		

Crossrefs

Differs from A080339 only at a(2).

Programs

  • Mathematica
    Table[Boole[PrimeOmega[n] < 2 && OddQ[n]], {n, 100}] (* Alonso del Arte, Nov 19 2013 *)

Formula

a(n) = (delta(Omega(n), 0) + delta(Omega(n), 1)) * d_0(n), where delta is the Kronecker delta function, Omega is the number of prime factors function (counted with multiplicity), and d_0(n) is the least significant digit of n in binary. - Alonso del Arte, Nov 19 2013

Extensions

Added missing a(2) - Walter Roscello, Nov 19 2013

A113824 a(1)=1; a(n+1) = the least prime greater than 2*a(n) which is a(n) plus a power of two.

Original entry on oeis.org

1, 3, 7, 23, 151, 65687, 9007199254806679, 73795983494093013143, 205688069665150755269371147819668813122842057000180977011589271
Offset: 1

Views

Author

Artur Jasinski, Jan 23 2006

Keywords

Comments

Next term 205688069665150755269371147819668813122842057000180977011589271 + 2^1752 is too large to include here.
Those powers of two are A073924.

Examples

			151 is there because 23 + 2^7 = 151 is prime.
		

Crossrefs

Extensions

Edited by Don Reble, Jan 25 2006

A113835 a(n) = a(n-1) + 2^(A007494(n-1)).

Original entry on oeis.org

1, 5, 13, 45, 109, 365, 877, 2925, 7021, 23405, 56173, 187245, 449389, 1497965, 3595117, 11983725, 28760941, 95869805, 230087533, 766958445, 1840700269, 6135667565, 14725602157, 49085340525, 117804817261, 392682724205
Offset: 1

Views

Author

Artur Jasinski, Jan 27 2006

Keywords

Crossrefs

Formula

Empirical g.f.: x*(4*x+1) / ((x-1)*(8*x^2-1)). - Colin Barker, Sep 01 2013

Extensions

Edited with better definition and offset corrected by Omar E. Pol, Jan 08 2009

A113878 a(1)=0; a(n+1) is the least number > a(n) such that Sum_{k=1..n+1} 2^a(k) is not composite.

Original entry on oeis.org

0, 1, 2, 4, 7, 16, 53, 66, 207, 1752, 5041, 6310
Offset: 1

Views

Author

Artur Jasinski, Jan 27 2006

Keywords

Comments

Base-2 logarithms of A073924.
a(13) > 50000. - Don Reble

Crossrefs

Programs

  • Mathematica
    a[1] = 0; a[n_] := a[n] = Block[{k = a[n - 1] + 1, s = Plus @@ (2^Array[a, n - 1])}, While[ !PrimeQ[s + 2^k], k++ ]; k]; Array[a, 12] (* Robert G. Wilson v *)
  • Python
    from sympy import isprime
    def afind(limit):
        print("0, 1", end=", ")
        s, pow2 = 2**0 + 2**1, 2**2
        for m in range(2, limit+1):
            if isprime(s+pow2): print(m, end=", "); s += pow2
            pow2 *= 2
    afind(2000) # Michael S. Branicky, Jul 11 2021

Extensions

Edited by Don Reble, Feb 17 2006

A113829 a(n) = a(n-1) + 2^(k(n)), where k(n) is the n-th term of the sequence of numbers that are congruent to {0,3,4,5,7,8} mod 12.

Original entry on oeis.org

1, 9, 25, 57, 185, 441, 4537, 37305, 102841, 233913, 758201, 1806777, 18583993, 152801721, 421237177, 958108089, 3105591737, 7400559033, 76120035769, 625875849657, 1725387477433, 3924410732985, 12720503755193, 30312689799609
Offset: 1

Views

Author

Artur Jasinski, Jan 27 2006

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,0,0,0,0,4096,-4096},{1,9,25,57,185,441,4537},30] (* Harvey P. Dale, Aug 04 2018 *)
  • PARI
    Vec((-4096*x^6+4096*x^5+256*x^4+128*x^3+32*x^2+16*x+9)/(4096*x^7 - 4096*x^6-x+1)+O(x^99)) \\ Charles R Greathouse IV, Apr 05 2012

Formula

G.f.: (9+16*x+32*x^2+128*x^3+256*x^4+4096*x^5-4096*x^6)/(1-x-4096*x^6+4096*x^7). - Charles R Greathouse IV, Apr 05 2012

Extensions

Better definition, corrected offset and edited by Omar E. Pol, Jan 08 2009

A113841 a(n) = a(n-1) + 2^A047240(n) for n>1, a(1)=1.

Original entry on oeis.org

1, 3, 7, 71, 199, 455, 4551, 12743, 29127, 291271, 815559, 1864135, 18641351, 52195783, 119304647, 1193046471, 3340530119, 7635497415, 76354974151, 213793927623, 488671834567, 4886718345671, 13682811367879, 31274997412295
Offset: 1

Views

Author

Artur Jasinski, Jan 27 2006

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 + 2 x + 4 x^2) / ((-1 + x) (-1 + 4 x) (1 + 4 x + 16 x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, May 19 2013 *)
    LinearRecurrence[{1,0,64,-64},{1,3,7,71},30] (* Harvey P. Dale, Nov 18 2013 *)

Formula

G.f.: x*(1+2*x+4*x^2)/((-1+x)*(-1+4*x)*(1+4*x+16*x^2)). - Vaclav Kotesovec, Nov 28 2012
a(1)=1, a(2)=3, a(3)=7, a(4)=71, a(n)=a(n-1)+64*a(n-3)-64*a(n-4). - Harvey P. Dale, Nov 18 2013

Extensions

Edited with better definition and offset corrected by Omar E. Pol, Jan 08 2009

A113860 Start with the binary representation of the Catalan constant (A104338, A006752) = 0.91596559... = sum_{i=1..infinity} b(i)/2^i, where b(i)=1,1,1,0,1,0,1,0,0,1,1,1,1.... Then a(n-1)=sum_{i=1..k: sum_{ j = 1..k} b(j)=n} b(i) * 2^(i-1). In words: scan the binary digits of the number, halt at each nonzero binary digit, add a power of 2 corresponding to the place of this digit after the comma, assign current partial sum to a(n), increment n.

Original entry on oeis.org

1, 3, 7, 23, 87, 599, 1623, 3671, 7767, 15959, 81495, 343639, 867927, 1916503, 18693719, 152911447, 421346903, 958217815, 2031959639, 4179443287, 12769377879, 1112281005655, 9908374027863, 27500560072279, 97869304249943
Offset: 0

Views

Author

Artur Jasinski, Jan 25 2006

Keywords

Comments

An instance of a Jasinski Integer Sequence using the convention JIS[number,counting system] as defined for example in A080355. This is JIS [Catalan constant,binary]=JIS[0.9159655941772190150546..,2].

Crossrefs

Extensions

Naming a sequence after oneself is deprecated. - N. J. A. Sloane.
Corrected and extended by R. J. Mathar, Aug 31 2007

A113867 a(n) = a(n-1) + 2^(A047258(n)) for n>1, a(1)=1.

Original entry on oeis.org

1, 17, 49, 113, 1137, 3185, 7281, 72817, 203889, 466033, 4660337, 13048945, 29826161, 298261617, 835132529, 1908874353, 19088743537, 53448481905, 122167958641, 1221679586417, 3420702841969, 7818749353073, 78187493530737
Offset: 1

Views

Author

Artur Jasinski, Jan 27 2006

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 + 16 x + 32 x^2) / ((-1 + x) (- 1 + 4 x) (1 + 4 x + 16 x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, May 20 2013 *)

Formula

G.f.: x*(1+16*x+32*x^2)/((-1+x)*(-1+4*x)*(1+4*x+16*x^2)). - Vaclav Kotesovec, Nov 28 2012

Extensions

Edited with better definition and offset corrected by Omar E. Pol, Jan 08 2009

A113870 a(n) = a(n-1) + 2^(k(n)), where k(n) is the n-th term of the sequence formed by k(1)=0 together with the numbers A042963.

Original entry on oeis.org

1, 3, 7, 39, 103, 615, 1639, 9831, 26215, 157287, 419431, 2516583, 6710887, 40265319, 107374183, 644245095, 1717986919, 10307921511, 27487790695, 164926744167, 439804651111, 2638827906663, 7036874417767, 42221246506599
Offset: 1

Views

Author

Artur Jasinski, Jan 27 2006

Keywords

Crossrefs

Programs

Formula

G.f.: (3+x-40*x^2)/(4*(-1+x)*(-1+4*x)*(1+4*x)). - Vaclav Kotesovec, Nov 28 2012

Extensions

Edited with better definition and offset corrected by Omar E. Pol, Jan 08 2009

A113876 a(n) = a(n-1) + 2^(k(n)), where k(n) is the n-th term of the sequence formed by k(1)=0 together with the numbers A042964.

Original entry on oeis.org

1, 5, 13, 77, 205, 1229, 3277, 19661, 52429, 314573, 838861, 5033165, 13421773, 80530637, 214748365, 1288490189, 3435973837, 20615843021, 54975581389, 329853488333, 879609302221, 5277655813325, 14073748835533, 84442493013197, 225179981368525, 1351079888211149
Offset: 1

Views

Author

Artur Jasinski, Jan 27 2006

Keywords

Crossrefs

Programs

Formula

G.f.: (1+x-8*x^2)/(2*(-1+x)*(-1+4*x)*(1+4*x)). - Vaclav Kotesovec, Nov 28 2012
a(n) = (4 + (-4)^n + 5*4^n)/20. - Gerry Martens, May 26 2024

Extensions

Edited with better definition and offset corrected by Omar E. Pol, Jan 08 2009
Showing 1-10 of 13 results. Next