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 38 results. Next

A008864 a(n) = prime(n) + 1.

Original entry on oeis.org

3, 4, 6, 8, 12, 14, 18, 20, 24, 30, 32, 38, 42, 44, 48, 54, 60, 62, 68, 72, 74, 80, 84, 90, 98, 102, 104, 108, 110, 114, 128, 132, 138, 140, 150, 152, 158, 164, 168, 174, 180, 182, 192, 194, 198, 200, 212, 224, 228, 230, 234, 240, 242, 252, 258, 264, 270, 272, 278, 282, 284
Offset: 1

Views

Author

Keywords

Comments

Sum of divisors of prime(n). - Labos Elemer, May 24 2001
For n > 1, there are a(n) more nonnegative Hurwitz quaternions than nonnegative Lipschitz quaternions, which are counted in A239396 and A239394, respectively. - T. D. Noe, Mar 31 2014
These are the numbers which are in A239708 or in A187813, but excluding the first 3 terms of A187813, i.e., a number m is a term if and only if m is a term > 2 of A187813, or m is the sum of two distinct powers of 2 such that m - 1 is prime. This means that a number m is a term if and only if m is a term > 2 such that there is no base b with a base-b digital sum of b, or b = 2 is the only base for which the base-b digital sum of m is b. a(6) is the only term such that a(n) = A187813(n); for n < 6, we have a(n) > A187813(n), and for n > 6, we have a(n) < A187813(n). - Hieronymus Fischer, Apr 10 2014
Does not contain any number of the format 1 + q + ... + q^e, q prime, e >= 2, i.e., no terms of A060800, A131991, A131992, A131993 etc. [Proof: that requires 1 + p = 1 + q + ... + q^e, or p = q*(1 + ... + q^(e-1)). This is not solvable because the left hand side is prime, the right hand side composite.] - R. J. Mathar, Mar 15 2018
1/a(n) is the asymptotic density of numbers whose prime(n)-adic valuation is odd. - Amiram Eldar, Jan 23 2021

References

  • C. W. Trigg, Problem #1210, Series Formation, J. Rec. Math., 15 (1982), 221-222.

Crossrefs

Column 1 of A341605, column 2 of A286623 and of A328464.
Partial sums of A125266.

Programs

Formula

a(n) = prime(n) + 1 = A000040(n) + 1.
a(n) = A000005(A034785(n)) = A000203(A000040(n)). - Labos Elemer, May 24 2001
a(n) = A084920(n) / A006093(n). - Reinhard Zumkeller, Aug 06 2007
A239703(a(n)) <= 1. - Hieronymus Fischer, Apr 10 2014
From Ilya Gutkovskiy, Jul 30 2016: (Start)
a(n) ~ n*log(n).
Product_{n>=1} (1 + 2/(a(n)*(a(n) - 2))) = 5/2. (End)

A034694 Smallest prime == 1 (mod n).

Original entry on oeis.org

2, 3, 7, 5, 11, 7, 29, 17, 19, 11, 23, 13, 53, 29, 31, 17, 103, 19, 191, 41, 43, 23, 47, 73, 101, 53, 109, 29, 59, 31, 311, 97, 67, 103, 71, 37, 149, 191, 79, 41, 83, 43, 173, 89, 181, 47, 283, 97, 197, 101, 103, 53, 107, 109, 331, 113, 229, 59, 709, 61, 367, 311
Offset: 1

Views

Author

Keywords

Comments

Thangadurai and Vatwani prove that a(n) <= 2^(phi(n)+1)-1. - T. D. Noe, Oct 12 2011
Conjecture: a(n) < n^2 for n > 1. - Thomas Ordowski, Dec 19 2016
Eric Bach and Jonathan Sorenson show that, assuming GRH, a(n) <= (1 + o(1))*(phi(n)*log(n))^2 for n > 1. See the abstract of their paper in the Links section. - Jianing Song, Nov 10 2019
a(n) is the smallest prime p such that the multiplicative group modulo p has a subgroup of order n. - Joerg Arndt, Oct 18 2020

Examples

			If n = 7, the smallest prime in the sequence 8, 15, 22, 29, ... is 29, so a(7) = 29.
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, section 2.12, pp. 127-130.
  • P. Ribenboim, The Book of Prime Number Records. Chapter 4,IV.B.: The Smallest Prime In Arithmetic Progressions, 1989, pp. 217-223.

Crossrefs

Programs

  • Haskell
    a034694 n = until ((== 1) . a010051) (+ n) (n + 1)
    -- Reinhard Zumkeller, Dec 17 2013
  • Mathematica
    a[n_] := Block[{k = 1}, If[n == 1, 2, While[Mod[Prime@k, n] != 1, k++ ]; Prime@k]]; Array[a, 64] (* Robert G. Wilson v, Jul 08 2006 *)
    With[{prs=Prime[Range[200]]},Flatten[Table[Select[prs,Mod[#-1,n]==0&,1],{n,70}]]] (* Harvey P. Dale, Sep 22 2021 *)
  • PARI
    a(n)=if(n<0,0,s=1; while((prime(s)-1)%n>0,s++); prime(s))
    

Formula

a(n) = min{m: m = k*n + 1 with k > 0 and A010051(m) = 1}. - Reinhard Zumkeller, Dec 17 2013
a(n) = n * A034693(n) + 1. - Joerg Arndt, Oct 18 2020

A051006 Prime constant: decimal value of (A010051 interpreted as a binary number).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

From Ferenc Adorjan (fadorjan(AT)freemail.hu): (Start)
Decimal expansion of the representation of the sequence of primes by a single real in (0,1).
Any monotonic integer sequence can be represented by a real number in (0, 1) in such a way that in the binary representation of the real, the n-th digit of the fractional part is 1 if and only if n is in the sequence.
Examples of the inverse mapping are A092855 and A092857. (End)
Is the prime constant an EL number? See Chow's 1999 article. - Lorenzo Sauras Altuzarra, Oct 05 2020
The asymptotic density of numbers with a prime number of trailing 0's in their binary representation (A370596), or a prime number of trailing 1's. - Amiram Eldar, Feb 23 2024

Examples

			0.414682509851111660... (base 10) = .01101010001010001010001... (base 2).
		

Crossrefs

Programs

  • Maple
    a := n -> ListTools:-Reverse(convert(floor(evalf[1000](sum(1/2^ithprime(k), k = 1 .. infinity)*10^(n+1))), base, 10))[n+1]: - Lorenzo Sauras Altuzarra, Oct 05 2020
  • Mathematica
    RealDigits[ FromDigits[ {{Table[ If[ PrimeQ[n], 1, 0], {n, 370}]}, 0}, 2], 10, 111][[1]] (* Robert G. Wilson v, Jan 15 2005 *)
    RealDigits[Sum[1/2^Prime[k], {k, 1000}], 10, 100][[1]] (* Alexander Adamchuk, Aug 22 2006 *)
  • PARI
    { mt(v)= /*Returns the binary mapping of v monotonic sequence as a real in (0,1)*/ local(a=0.0,p=1,l);l=matsize(v)[2]; for(i=1,l,a+=2^(-v[i])); return(a)} \\ Ferenc Adorjan
    
  • PARI
    { default(realprecision, 20080); x=0; m=67000; for (n=1, m, if (isprime(n), a=1, a=0); x=2*x+a; ); x=10*x/2^m; for (n=0, 20000, d=floor(x); x=(x-d)*10; write("b051006.txt", n, " ", d)); } \\ Harry J. Smith, Jun 15 2009
    
  • PARI
    suminf(n=1,.5^prime(n)) \\ Then: digits(%\.1^default(realprecision)) to get seq. of digits. N.B.: Functions sumpos() and sumnum() yield much less accurate results. - M. F. Hasler, Jul 04 2017

Formula

Prime constant C = Sum_{k>=1} 1/2^prime(k), where prime(k) is the k-th prime. - Alexander Adamchuk, Aug 22 2006
From Amiram Eldar, Aug 11 2020: (Start)
Equals Sum_{k>=1} A010051(k)/2^k.
Equals Sum_{k>=1} 1/A034785(k).
Equals (1/2) * A119523.
Equals Sum_{k>=1} pi(k)/2^(k+1), where pi(k) = A000720(k). (End)

A057901 a(n) = 3^prime(n).

Original entry on oeis.org

9, 27, 243, 2187, 177147, 1594323, 129140163, 1162261467, 94143178827, 68630377364883, 617673396283947, 450283905890997363, 36472996377170786403, 328256967394537077627, 26588814358957503287787
Offset: 1

Views

Author

Henry Bottomley, Sep 29 2000

Keywords

Examples

			a(4) = 3^7 = 2187.
		

Crossrefs

Subsequence of A000244 (powers of 3).

Programs

Formula

a(n) = 3^A000040(n).
Sum_{n>=1} 1/a(n) = A132800. - Amiram Eldar, Aug 11 2020

A076793 a(n) = Sum_{k=1..n} 2^prime(k).

Original entry on oeis.org

0, 4, 12, 44, 172, 2220, 10412, 141484, 665772, 9054380, 545925292, 2693408940, 140132362412, 2339155617964, 11135248640172, 151872736995500, 9159071991736492, 585619824295159980, 2891462833508853932, 150465415423185266860, 2511648656858007873708
Offset: 0

Views

Author

Walter Carlini, Nov 17 2002

Keywords

Comments

a(468) has 1000 decimal digits. - Michael De Vlieger, Jul 14 2017

Examples

			a(1) = 2^prime(1) = 2^2 = 4; a(2) = 4 + 2^prime(2) = 4 + 2^3 = 12.
		

Crossrefs

Partial sums of A034785.

Programs

  • Mathematica
    Table[Sum[2^Prime[k], {k, n}], {n, 0, 18}] (* Michael De Vlieger, Jul 14 2017 *)
  • PARI
    a(n) = sum(k=1, n, 2^prime(k)) \\ Michel Marcus, Jul 23 2013

Formula

a(n) = a(n-1) + 2^prime(n).

Extensions

More terms from R. J. Mathar, Aug 31 2007

A057902 a(n) = 5^prime(n).

Original entry on oeis.org

25, 125, 3125, 78125, 48828125, 1220703125, 762939453125, 19073486328125, 11920928955078125, 186264514923095703125, 4656612873077392578125, 72759576141834259033203125, 45474735088646411895751953125
Offset: 1

Views

Author

Henry Bottomley, Sep 29 2000

Keywords

Examples

			a(4) = 5^7 = 78125.
		

Crossrefs

Programs

Formula

a(n) = 5^A000040(n).
Sum_{n>=1} 1/a(n) = A132797. - Amiram Eldar, Aug 11 2020

A007547 Number of steps to compute n-th prime in PRIMEGAME (slow version).

Original entry on oeis.org

19, 69, 281, 710, 2375, 3893, 8102, 11361, 19268, 36981, 45680, 75417, 101354, 118093, 152344, 215797, 293897, 327571, 429229, 508284, 556494, 701008, 809381, 990746, 1274952, 1435957, 1531854, 1712701, 1820085, 2021938, 2835628, 3107393, 3549288, 3723821
Offset: 1

Views

Author

Keywords

References

  • D. Olivastro, Ancient Puzzles. Bantam Books, NY, 1993, p. 21.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a007547 n = a007547_list !! n
    a007547_list = tail $ elemIndices 2 $ map a006530 a007542_list
    -- Reinhard Zumkeller, Jan 24 2012
  • Maple
    a:= proc(n) option remember; local l, p, m, k;
          l:= [17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23,
               77/19, 1/17, 11/13, 13/11, 15/2, 1/7, 55/1]:
          if n=1 then b(0):= 2; a(0):= 0 else a(n-1) fi;
          p:= b(n-1);
          for m do for k while not type(p*l[k], integer) do od;
                   p:= p*l[k];
                   if 2^ilog2(p)=p then break fi
          od:
          b(n):= p;
          m + a(n-1)
        end:
    seq(a(n), n=1..10);  # Alois P. Heinz, May 01 2011
  • Mathematica
    Clear[a]; a[n_] := a[n] = Module[{l, p, m, k}, l = {17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, 77/19, 1/17, 11/13, 13/11, 15/2, 1/7, 55/1}; If[n == 1, b[0] = 2; a[0] = 0, a[n-1]]; p = b[n-1]; For[m=1, True, m++, For[k=1, !IntegerQ[p*l[[k]]], k++]; p = p*l[[k]]; If[2^(Length[IntegerDigits[p, 2]]-1) == p, Break[]]]; b[n] = p; m + a[n-1]]; Table[Print[a[n]]; a[n], {n, 1, 30}] (* Jean-François Alcover, Nov 25 2014, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, May 01 2011

A241573 2^p + 3 where p is prime.

Original entry on oeis.org

7, 11, 35, 131, 2051, 8195, 131075, 524291, 8388611, 536870915, 2147483651, 137438953475, 2199023255555, 8796093022211, 140737488355331, 9007199254740995, 576460752303423491, 2305843009213693955, 147573952589676412931, 2361183241434822606851
Offset: 1

Views

Author

Vincenzo Librandi, Apr 29 2014

Keywords

Crossrefs

Cf. sequences of the form 2^p+k with p prime: A034785 (k=0), A001348 (k=-1), A098640 (k=1), A241676 (k=-3), this sequence (k=3), A241678 (k=-5), A241677 (k=5), A098815 (k=-7), A241679 (k=7), A098231 (k=-11), A241680 (k=11).

Programs

  • Magma
    [2^p+3: p in PrimesUpTo(100)];
    
  • Mathematica
    Table[2^Prime[n] + 3, {n, 20}]
  • Sage
    [2^p+3 for p in primes(100)] # Bruno Berselli, Apr 29 2014

A366988 The number of prime powers of prime numbers (A053810) that divide n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0, 0, 2, 1, 0, 2, 1, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 1, 0, 0, 2, 1, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 1, 0, 0, 1, 3, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 1, 1, 0, 0, 0, 2, 2, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Amiram Eldar, Oct 31 2023

Keywords

Comments

a(n) depends only on the prime signature of n.
Every nonnegative number appears in the sequence of record values. k >= 1 first occurs at n = 2^prime(k) (A034785).

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := PrimePi[e]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); sum(i = 1, #f~, primepi(f[i, 2]));}

Formula

Additive with a(p^e) = A000720(e).
a(n) = 0 if and only if n is squarefree (A005117).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} P(p) = 0.67167522222173297323..., where P(s) is the prime zeta function.

A139238 First differences of Mersenne numbers A001348.

Original entry on oeis.org

4, 24, 96, 1920, 6144, 122880, 393216, 7864320, 528482304, 1610612736, 135291469824, 2061584302080, 6597069766656, 131941395333120, 8866461766385664, 567453553048682496, 1729382256910270464, 145268109580462718976, 2213609288845146193920
Offset: 1

Views

Author

Omar E. Pol, Apr 19 2008

Keywords

Comments

Also, first differences of 2^prime(n) = A034785(n). - Wesley Ivan Hurt, Jul 02 2014

Examples

			a(2)=24 because A001348(2)=7 and A001348(2+1)=31 then 31-7 = 24.
		

Crossrefs

Programs

Formula

a(n) = A001348(n+1) - A001348(n).
a(n) = A034785(n+1) - A034785(n). - Wesley Ivan Hurt, Jul 02 2014

Extensions

a(10)-a(19) from Felix Fröhlich, Jun 30 2014
Showing 1-10 of 38 results. Next