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-7 of 7 results.

A000960 Flavius Josephus's sieve: Start with the natural numbers; at the k-th sieving step, remove every (k+1)-st term of the sequence remaining after the (k-1)-st sieving step; iterate.

Original entry on oeis.org

1, 3, 7, 13, 19, 27, 39, 49, 63, 79, 91, 109, 133, 147, 181, 207, 223, 253, 289, 307, 349, 387, 399, 459, 481, 529, 567, 613, 649, 709, 763, 807, 843, 927, 949, 1009, 1093, 1111, 1189, 1261, 1321, 1359, 1471, 1483, 1579, 1693, 1719, 1807, 1899, 1933, 2023
Offset: 1

Views

Author

Keywords

Comments

a(n) is never divisible by 2 or 5. - Thomas Anton, Nov 01 2018

Examples

			Start with
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ... (A000027) and delete every second term, giving
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 ... (A005408) and delete every 3rd term, giving
1 3 7 9 13 15 19 21 25 27 ... (A056530) and delete every 4th term, giving
1 3 7 13 15 19 25 27 ... (A056531) and delete every 5th term, giving
.... Continue forever and what's left is the sequence.
(The array formed by these rows is A278492.)
For n = 5, 5^2 = 25, go down to a multiple of 4 giving 24, then to a multiple of 3 = 21, then to a multiple of 2 = 20, then to a multiple of 1 = 19, so a(5) = 19.
		

References

  • V. Brun, Un procédé qui ressemble au crible d'Ératosthène, Analele Stiintifice Univ. "Al. I. Cuza", Iasi, Romania, Sect. Ia Matematica, 1965, vol. 11B, pp. 47-53.
  • Problems 107, 116, Nord. Mat. Tidskr. 5 (1957), 114-116.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A119446 for triangle whose leading diagonal is A119447 and this sequence gives all possible values for A119447 (except A119447 cannot equal 1 because prime(n)/n is never 1).
Cf. A100617 (a left inverse), A100618.
Cf. A278169 (characteristic function).
Main diagonal of A278492, leftmost column of A278505, positions of zeros in A278528 & A278529.

Programs

  • Haskell
    a000960 n = a000960_list !! (n-1)
    a000960_list = sieve 1 [1..] where
       sieve k (x:xs) = x : sieve (k+1) (flavius xs) where
          flavius xs = us ++ flavius vs where (u:us,vs) = splitAt (k+1) xs
    -- Reinhard Zumkeller, Oct 31 2012
    
  • Maple
    S[1]:={seq(i,i=1..2100)}: for n from 2 to 2100 do S[n]:=S[n-1] minus {seq(S[n-1][n*i],i=1..nops(S[n-1])/n)} od: A:=S[2100]; # Emeric Deutsch, Nov 17 2004
  • Mathematica
    del[lst_, k_] := lst[[Select[Range[Length[lst]], Mod[ #, k] != 0 &]]]; For[k = 2; s = Range[2100], k <= Length[s], k++, s = del[s, k]]; s
    f[n_] := Fold[ #2*Ceiling[ #1/#2 + 1] &, n, Reverse@Range[n - 1]]; Array[f, 60] (* Robert G. Wilson v, Nov 05 2005 *)
  • PARI
    a(n)=local(A=n,D);for(i=1,n-1,D=n-i;A=D*ceil(A/D+1));return(A) \\ Paul D. Hanna, Oct 10 2005
    
  • Python
    def flavius(n):
        L = list(range(1,n+1));j=2
        while j <= len(L):
            L = [L[i] for i in range(len(L)) if (i+1)%j]
            j+=1
        return L
    flavius(100)
    # Robert FERREOL, Nov 08 2015

Formula

Let F(n) = number of terms <= n. Andersson, improving results of Brun, shows that F(n) = 2 sqrt(n/Pi) + O(n^(1/6)). Hence a(n) grows like Pi*n^2 / 4.
To get n-th term, start with n and successively round up to next 2 multiples of n-1, n-2, ..., 1 (compare to Mancala sequence A002491). E.g.: to get 11th term: 11->30->45->56->63->72->80->84->87->90->91; i.e., start with 11, successively round up to next 2 multiples of 10, 9, .., 1. - Paul D. Hanna, Oct 10 2005
As in Paul D. Hanna's formula, start with n^2 and successively move down to the highest multiple of n-1, n-2, etc., smaller than your current number: 121 120 117 112 105 102 100 96 93 92 91, so a(11) = 91, from moving down to multiples of 10, 9, ..., 1. - Joshua Zucker, May 20 2006
Or, similarly for n = 5, begin with 25, down to a multiple of 4 = 24, down to a multiple of 3 = 21, then to a multiple of 2 = 20 and finally to a multiple of 1 = 19, so a(5) = 19. - Joshua Zucker, May 20 2006
This formula arises in A119446; the leading term of row k of that triangle = a(prime(k)/k) from this sequence. - Joshua Zucker, May 20 2006
a(n) = 2*A073359(n-1) + 1, cf. link to posts on the SeqFan list. - M. F. Hasler, Nov 23 2016
a(n) = 1 + A278484(n-1). - Antti Karttunen, Nov 23 2016, after David W. Wilson's posting on SeqFan list Nov 22 2016

Extensions

More terms and better description from Henry Bottomley, Jun 16 2000
Entry revised by N. J. A. Sloane, Nov 13 2004
More terms from Paul D. Hanna, Oct 10 2005

A285388 a(n) = numerator of ((1/n) * Sum_{k=0..n^2-1} binomial(2k,k)/4^k).

Original entry on oeis.org

1, 35, 36465, 300540195, 79006629023595, 331884405207627584403, 22292910726608249789889125025, 11975573020964041433067793888190275875, 411646257111422564507234009694940786177843149765, 56592821660064550728377610673427602421565368547133335525825
Offset: 1

Views

Author

Ralf Steiner, Apr 18 2017

Keywords

Comments

Editorial comment: This sequence arose from Ralf Steiner's attempt to prove Legendre's conjecture that there is a prime between N^2 and (N+1)^2 for all N. - N. J. A. Sloane, May 01 2017

Crossrefs

Cf. A000079, A000265, A056220, A060757, A201555, A285389 (denominators), A285406, A280655 (similar), A190732 (2/sqrt(Pi)), A285738 (greatest prime factor), A285717, A285730, A285786, A286264, A000290 (n^2), A056220 (2*n^2 -1), A286127 (sum a(n-1)/a(n)).

Programs

  • Magma
    [Numerator( n*(n^2+1)*Catalan(n^2)/2^(2*n^2-1) ): n in [1..21]]; // G. C. Greubel, Dec 11 2021
    
  • Mathematica
    Table[Numerator[Sum[Binomial[2k,k]/4^k,{k,0,n^2-1}]/n],{n,1,10}]
    Numerator[Table[2^(1-2 n^2) n Binomial[2 n^2,n^2],{n,1,10}]] (* Ralf Steiner, Apr 22 2017 *)
  • PARI
    A285388(n) = numerator((2^(1 - 2*(n^2)))*n*binomial(2*(n^2), n^2)); \\ Antti Karttunen, Apr 27 2017
    
  • PARI
    a(n) = m=n*binomial(2*n^2, n^2);m>>valuation(m,2) \\ David A. Corneth, Apr 27 2017
    
  • Python
    from sympy import binomial, Integer
    def a(n): return (Integer(2)**(1 - 2*n**2)*n*binomial(2*n**2, n**2)).numerator # Indranil Ghosh, Apr 27 2017
    
  • Sage
    [numerator( n*(n^2+1)*catalan_number(n^2)/2^(2*n^2-1) ) for n in (1..20)] # G. C. Greubel, Dec 11 2021

Formula

a(n) is numerator of n*binomial(2 n^2, n^2)/2^(2*n^2 - 1). - Ralf Steiner, Apr 26 2017
a(n) = numerator(n*A201555(n) / (A060757(n)/2)) = n*A201555(n) / 2^(A285717(n)) = A000265(n*A201555(n)). [Using Ralf Steiner's formula and A285717(n) <= A056220(n), cf. A285406.] - Antti Karttunen, Apr 27 2017
Limit_{i->oo} a(i)*A285389(i+1)/(a(i+1)*A285389(i)) = 1. - Ralf Steiner, May 03 2017

Extensions

Edited (including the removal of the author's claim that this leads to a proof of the Legendre conjecture) by N. J. A. Sloane, May 01 2017
Formula section edited by M. F. Hasler, May 02 2017
Edited by N. J. A. Sloane, May 10 2017

A285389 Denominator of Sum_{k=0..n^2-1} (-1)^k*sqrt(Pi)/(Gamma(1/2-k)*Gamma(1+k))/n.

Original entry on oeis.org

1, 32, 32768, 268435456, 70368744177664, 295147905179352825856, 19807040628566084398385987584, 10633823966279326983230456482242756608, 365375409332725729550921208179070754913983135744, 50216813883093446110686315385661331328818843555712276103168
Offset: 1

Views

Author

Ralf Steiner, Apr 18 2017

Keywords

Comments

All terms are powers of 2.
Lim_{n->inf} A285388(n)/a(n) = 2/sqrt(Pi).

Crossrefs

Cf. A000079 (powers of 2), A285388 (numerators), A285406 (log base 2; A281264 + A007814), A190732 (2/sqrt(Pi)).

Programs

  • Magma
    [Denominator( n*(n^2+1)*Catalan(n^2)/2^(2*n^2-1) ): n in [1..21]]; // G. C. Greubel, Dec 11 2021
    
  • Mathematica
    Table[Denominator[Sum[Binomial[2k,k]/4^k,{k,0,n^2-1}]/n],{n,1,10}]
    Denominator[Table[2^(1-2 n^2) n Binomial[2 n^2, n^2], {n, 1, 10}]] (* Ralf Steiner, Apr 22 2017 *)
  • Python
    from sympy import binomial, Integer
    def a(n): return (Integer(2)**(1-2*n**2) * Integer(n) * binomial(2*n**2, n**2)).denominator # Indranil Ghosh, Apr 27 2017
    
  • Sage
    def A285389(n): return 2^(2*n^2 - 1 - (n^2).popcount() - valuation(n, 2))
    [A285389(n) for n in (1..20)] # G. C. Greubel, Dec 12 2021

Formula

a(n) is the denominator of Sum_{k=0..n^2-1} (binomial(2k,k)/4^k)/n.
a(n) = A000079(A285406(n)).
a(n) = denominator of n*binomial(2*n^2, n^2)/2^(2*n^2 -1). - Ralf Steiner, Apr 22 2017

A249521 Decimal expansion of 4/sqrt(Pi), the average distance between two random Gaussian points in three dimensions.

Original entry on oeis.org

2, 2, 5, 6, 7, 5, 8, 3, 3, 4, 1, 9, 1, 0, 2, 5, 1, 4, 7, 7, 9, 2, 3, 1, 7, 8, 0, 6, 2, 4, 3, 0, 9, 0, 3, 4, 3, 3, 7, 6, 2, 0, 2, 5, 1, 7, 3, 1, 5, 9, 9, 5, 4, 2, 7, 3, 7, 6, 3, 4, 2, 8, 8, 6, 8, 4, 2, 5, 6, 9, 8, 7, 3, 7, 6, 5, 9, 7, 3, 6, 5, 7, 9, 4, 6, 9, 7, 4, 6, 4, 0, 8, 0, 8, 4, 2, 9, 4, 5, 3, 7, 7, 2
Offset: 1

Views

Author

Jean-François Alcover, Oct 31 2014

Keywords

Comments

Coordinates are independent normally distributed random variables with mean 0 and variance 1.

Examples

			2.25675833419102514779231780624309034337620251731...
		

Crossrefs

Cf. A002161 (the analog constant in two dimensions), A087197, A190732 (the analog constant in one dimension).

Programs

  • Mathematica
    RealDigits[4/Sqrt[Pi], 10, 103] // First
  • PARI
    4/sqrt(Pi) \\ G. C. Greubel, Jan 09 2017

Formula

Equals Sum_{k>=0} k!/(k+3/2)!. - Amiram Eldar, Jun 19 2023

A337092 Decimal expansion of sqrt(40/Pi).

Original entry on oeis.org

3, 5, 6, 8, 2, 4, 8, 2, 3, 2, 3, 0, 5, 5, 4, 2, 2, 2, 9, 0, 7, 7, 9, 3, 2, 7, 4, 5, 1, 3, 0, 1, 6, 5, 1, 8, 0, 7, 8, 8, 4, 0, 5, 8, 4, 1, 1, 4, 3, 9, 0, 6, 9, 4, 3, 7, 1, 8, 5, 4, 7, 6, 9, 1, 6, 9, 1, 0, 6, 1, 5, 5, 9, 0, 6, 0, 8, 6, 1, 5, 5, 0, 5, 1, 9, 6
Offset: 1

Views

Author

Peter Munn, Aug 15 2020

Keywords

Comments

A gauge point marked c^1 or c_1 ("c" with a superscripted or subscripted "1") on slide rule calculating devices in the 20th century. The Pickworth reference notes its use "in calculating the contents of cylinders".

Examples

			3.568248232305...
		

References

  • C. N. Pickworth, The Slide Rule, 24th Ed., Pitman, London, 1945, p. 53, Gauge Points.

Crossrefs

Programs

  • Maple
    evalf(sqrt(40.0/Pi)) ; # R. J. Mathar, Sep 02 2020
  • Mathematica
    RealDigits[Sqrt[40/Pi], 10, 100][[1]] (* Amiram Eldar, Aug 15 2020 *)
  • PARI
    sqrt(40/Pi) \\ Michel Marcus, Aug 19 2020

Formula

Equals A010494/A002161 = 2*sqrt(10*A049541).

A277050 a(n) = floor(2*n/sqrt(Pi)).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A037086, A190732, A277052 (complement).

Programs

  • Maple
    A277050:=n->floor(2*n/sqrt(Pi)): seq(A277050(n), n=0..100); # Wesley Ivan Hurt, Sep 26 2016
  • Mathematica
    Table[Floor[2 * n/Sqrt[Pi]], {n, 100}]
  • PARI
    a(n) = floor(2*n/sqrt(Pi));

Formula

a(n) = floor(2*n/sqrt(Pi)).

A277052 a(n) = n+floor(n/(2/sqrt(Pi)-1)).

Original entry on oeis.org

8, 17, 26, 35, 43, 52, 61, 70, 79, 87, 96, 105, 114, 123, 131, 140, 149, 158, 166, 175, 184, 193, 202, 210, 219, 228, 237, 246, 254, 263, 272, 281, 290, 298, 307, 316, 325, 333, 342, 351, 360, 369, 377, 386, 395, 404, 413, 421, 430, 439, 448, 457, 465, 474
Offset: 1

Views

Author

Keywords

Crossrefs

Complement of A277050.

Programs

  • Maple
    A277052:=n->n+floor(n/(2/sqrt(Pi)-1)): seq(A277052(n), n=1..100); # Wesley Ivan Hurt, Sep 26 2016
  • Mathematica
    f[n_] := n + Floor[n/(2/Sqrt[Pi]-1)]; Array[f, 100, 1]
  • PARI
    a(n) = n + floor(n/(2/sqrt(Pi)-1));

Formula

a(n) = n + floor(n/(2/sqrt(Pi) - 1)).
Showing 1-7 of 7 results.