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.

Previous Showing 21-25 of 25 results.

A192515 Number of primes in the range [2^n-n^2, 2^n].

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 9, 10, 11, 15, 15, 16, 16, 18, 19, 20, 21, 23, 23, 31, 24, 34, 28, 27, 35, 32, 41, 38, 46, 45, 38, 44, 36, 49, 51, 43, 61, 33, 48, 58, 42, 62, 67, 59, 63, 70, 57, 63, 73, 68, 85, 74, 75, 73, 77, 86, 85, 74, 94, 89, 83, 89, 94, 93, 97, 102
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Jul 03 2011

Keywords

Examples

			a(0)=0 because [2^0-0^2, 2^0]=[1, 1],
a(1)=1 because 2 in range [2^1-1^2, 2^1]=[1, 2],
a(2)=2 because 2, 3 in range [2^2-2^2, 2^2]=[0, 4],
a(3)=4 because 2, 3, 5, 7 in range [2^3-3^2, 2^3]=[-1, 8],
a(4)=6 because 2, 3, 5, 7, 11, 13 in range [2^4-4^2, 2^4]=[0, 16],
a(5)=8 because 7, 11, 13, 17, 19, 23, 29, 31 in range [2^5-5^2, 2^5]=[7, 32].
		

Crossrefs

Programs

  • Maple
    A192515 := proc(n) a := 0 ; for i from 2^n-n^2 to 2^n do if isprime(i) then a := a+1 ; end if; end do; a ; end proc: # R. J. Mathar, Jul 11 2011
  • Mathematica
    Table[Count[Range[2^n - n^2, 2^n], p_ /; PrimeQ@ p], {n, 0, 65}] (* Michael De Vlieger, Apr 03 2016 *)
  • PARI
    a(n) = primepi(2^n) - primepi(2^n-n^2) + isprime(2^n-n^2); \\ Michel Marcus, Apr 03 2016

Extensions

Corrected and extended by R. J. Mathar, Jul 11 2011

A220588 a(n) = 2^n - n^2 - n.

Original entry on oeis.org

1, 0, -2, -4, -4, 2, 22, 72, 184, 422, 914, 1916, 3940, 8010, 16174, 32528, 65264, 130766, 261802, 523908, 1048156, 2096690, 4193798, 8388056, 16776616, 33553782, 67108162, 134216972, 268434644, 536870042, 1073740894, 2147482656, 4294966240, 8589933470, 17179867994
Offset: 0

Views

Author

Dario Piazzalunga, Dec 16 2012

Keywords

Examples

			a(3) = -4 because 2^3 - 3^2 - 3 = 8 - 9 - 3 = -4.
a(4) = -4 because 2^4 - 4^2 - 4 = 16 - 16 - 4 = -4.
a(5) = 2 because 2^5 - 5^2 - 5 = 32 - 25 - 5 = 2.
a(6) = 22 because 2^6 - 6^2 - 6 = 64 - 36 - 6 = 22.
		

Crossrefs

Programs

  • Mathematica
    Table[2^n - n^2 - n, {n, 0, 32}] (* Alonso del Arte, Dec 16 2012 *)
  • Maxima
    A220588(n):=2^n-n^2-n$ makelist(A220588(n),n,0,20); /* Martin Ettl, Dec 18 2012 */
    
  • PARI
    Vec((1 - 5*x + 7*x^2 - x^3) / ((1 - x)^3*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Aug 16 2017

Formula

a(n) = 2*a(n - 1) + ((n - 3)^2 + 3(n - 3)) = 2*a(n - 1) + A028552(n - 3) for n > 4.
a(n) = (2*a(n-1) + 7*a(n-2))*2 = A015519/2 for n > 4.
From Colin Barker, Aug 16 2017: (Start)
G.f.: (1 - 5*x + 7*x^2 - x^3) / ((1 - x)^3*(1 - 2*x)).
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4) for n>3.
(End)

Extensions

a(3) corrected by Charles A. Dagino, Aug 16 2017

A174174 Floor(Pi^n-n^Pi).

Original entry on oeis.org

2, 1, -1, 19, 149, 683, 2568, 8801, 28814, 92262, 292334, 921812, 2900518, 9118183, 28653193, 90026155, 282837225, 888573621, 2791553542, 8769944569, 27551617590, 86555987697, 271923687926, 854273498233, 2683779389671
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Floor[Pi^n-n^Pi],{n,5!}]

A249305 Primes p such that 2^p - p^2 is not squarefree.

Original entry on oeis.org

2, 89, 149, 151, 383, 409, 443
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 25 2014

Keywords

Comments

Sequence is infinite, containing all primes congruent to 2, 4, 89, or 115 mod 147. - Charles R Greathouse IV, Oct 28 2014
997 is also a term in this sequence. - Kevin P. Thompson, Jun 13 2022

Examples

			2 is in this sequence because 2 is prime and 2^2 - 2^2 = 0 is not squarefree.
		

Crossrefs

Programs

  • Magma
    [n: n in [3..269] | IsPrime(n) and not IsSquarefree(2^n - n^2)];
    
  • PARI
    is(n)=isprime(n) && !issquarefree(2^n-n^2) \\ Charles R Greathouse IV, Oct 28 2014

Formula

a(n) < (21 + e)*n log n for any e > 0 and all large enough n. - Charles R Greathouse IV, Oct 28 2014

Extensions

a(5)-a(6) from Charles R Greathouse IV, Oct 28 2014
a(7) from Kevin P. Thompson, Jun 13 2022

A372152 Number of k in the range 2^n <= k < 2^(n+1) whose shortest addition chain does not have length n, n+1 or n+2.

Original entry on oeis.org

0, 0, 0, 0, 2, 9, 30, 80, 193, 432, 925, 1928, 3953, 8024, 16189, 32544
Offset: 0

Views

Author

Szymon Lukaszyk, Apr 20 2024

Keywords

Comments

The length of the shortest addition chain for k is A003313(k).
Dividing natural numbers into sections 2^n <= k < 2^(n+1), some of the 2^n numbers available in a section have the shortest addition chains given by
n (for k=2^n),
n+1 (for k=2^n+2^m, m in [0..n-1], A048645), or
n+2 (for some k in A072823).
The sequence gives the numbers of k within each section (N_oth) that have the shortest addition chains other than n, n+1, and n+2.
In particular for 4 <= n <= 6, N_oth = 2^n - n^2 + 2 and for n >= 7, N_oth = 2^n - n^2 + 1.

Crossrefs

Previous Showing 21-25 of 25 results.