A006093 a(n) = prime(n) - 1.
1, 2, 4, 6, 10, 12, 16, 18, 22, 28, 30, 36, 40, 42, 46, 52, 58, 60, 66, 70, 72, 78, 82, 88, 96, 100, 102, 106, 108, 112, 126, 130, 136, 138, 148, 150, 156, 162, 166, 172, 178, 180, 190, 192, 196, 198, 210, 222, 226, 228, 232, 238, 240, 250, 256, 262, 268, 270
Offset: 1
References
- Archimedeans Problems Drive, Eureka, 40 (1979), 28.
- Harvey Dubner, Generalized Fermat primes, J. Recreational Math., 18 (1985): 279-280.
- M. Gardner, The Colossal Book of Mathematics, pp. 31, W. W. Norton & Co., NY, 2001.
- M. Gardner, Mathematical Circus, pp. 251-2, Alfred A. Knopf, NY, 1979.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- Thomas F. Bloom, Unit fractions with shifted prime denominators, arXiv:2305.02689 [math.NT], 2023.
- R. P. Boas & N. J. A. Sloane, Correspondence, 1974
- Harvey Dubner, Generalized Fermat primes, J. Recreational Math. 18.4 (1985-1986), 279. (Annotated scanned copy)
- Armel Mercier, Problem E 3065, American Mathematical Monthly, 1984, p. 649.
- Armel Mercier, S. K. Rangarajan, J. C. Binz and Dan Marcus, Problem E 3065, American Mathematical Monthly, No. 4, 1987, pp. 378.
- Poo-Sung Park, Additive uniqueness of PRIMES-1 for multiplicative functions, arXiv:1708.03037 [math.NT], 2017.
- J. R. Rickard and J. J. Hitchcock, Problem Drive 4, Archimedeans Problems Drive, Eureka, 40 (1979), 28-29, 40. (Annotated scanned copy)
- Index entries for sequences generated by sieves
Crossrefs
a(n) = K(n, 1) and A034693(K(n, 1)) = 1 for all n. The subscript n refers to this sequence and K(n, 1) is the index in A034693. - Labos Elemer
Essentially the same as A039915.
Programs
-
GAP
Filtered([1..280],IsPrime)-1; # Muniru A Asiru, Nov 25 2018
-
Haskell
a006093 = (subtract 1) . a000040 -- Reinhard Zumkeller, Mar 06 2012
-
Magma
[NthPrime(n)-1: n in [1..100]]; // Vincenzo Librandi, Nov 17 2015
-
Maple
for n from 2 to 271 do if (n! mod n^2 = n*(n-1) and (n<>4) then print(n-1) fi od; # Gary Detlefs, Sep 10 2010 # alternative A006093 := proc(n) ithprime(n)-1 ; end proc: seq(A006093(n),n=1..100) ; # R. J. Mathar, Feb 06 2019
-
Mathematica
Table[Prime[n] - 1, {n, 1, 30}] (* Vladimir Joseph Stephan Orlovsky, Apr 27 2008 *) a[ n_] := If[ n < 1, 0, -1 + Prime @ n] (* Michael Somos, Jul 17 2011 *) Prime[Range[60]] - 1 (* Alonso del Arte, Oct 26 2013 *)
-
PARI
isA006093(n) = isprime(n+1) \\ Michael B. Porter, Apr 09 2010
-
PARI
A006093(n) = prime(n)-1 \\ Michael B. Porter, Apr 09 2010
-
PARI
\\ Sieve as described in Rainer Rosenthal's comment. m=270;s=vector(m);for(i=1,m,for(j=i,m,k=i*j+i+j;if(k<=m,s[k]=1)));for(k=1,m,if(s[k]==0,print1(k,", "))); \\ Hugo Pfoertner, May 14 2019
-
Python
from sympy import prime for n in range(1,100): print(prime(n)-1, end=', ') # Stefano Spezia, Nov 30 2018
Formula
a(n) = (p-1)! mod p where p is the n-th prime, by Wilson's theorem. - Jonathan Sondow, Jul 13 2010
a(n) = A000040(n) - 1. - Omar E. Pol, Oct 26 2013
Extensions
Obfuscating comments removed by Joerg Arndt, Mar 11 2010
Edited by Charles R Greathouse IV, Apr 20 2010
Comments