Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I M1006 #243 Dec 29 2024 00:42:53
%S 1,2,4,6,10,12,16,18,22,28,30,36,40,42,46,52,58,60,66,70,72,78,82,88,
%T 96,100,102,106,108,112,126,130,136,138,148,150,156,162,166,172,178,
%U 180,190,192,196,198,210,222,226,228,232,238,240,250,256,262,268,270
%N a(n) = prime(n) - 1.
%C These are also the numbers that cannot be written as i*j + i + j (i,j >= 1). - _Rainer Rosenthal_, Jun 24 2001; _Henry Bottomley_, Jul 06 2002
%C The values of k for which Sum_{j=0..n} (-1)^j*binomial(k, j)*binomial(k-1-j, n-j)/(j+1) produces an integer for all n such that n < k. Setting k=10 yields [0, 1, 4, 11, 19, 23, 19, 11, 4, 1, 0] for n = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9], so 10 is in the sequence. Setting k=3 yields [0, 1, 1/2, 1/2] for n = [-1, 0, 1, 2], so 3 is not in the sequence. - Dug Eichelberger (dug(AT)mit.edu), May 14 2001
%C n such that x^n + x^(n-1) + x^(n-2) + ... + x + 1 is irreducible. - _Robert G. Wilson v_, Jun 22 2002
%C Records for Euler totient function phi.
%C Together with 0, n such that (n+1) divides (n!+1). - _Benoit Cloitre_, Aug 20 2002; corrected by _Charles R Greathouse IV_, Apr 20 2010
%C n such that phi(n^2) = phi(n^2 + n). - _Jon Perry_, Feb 19 2004
%C Numbers having only the trivial perfect partition consisting of a(n) 1's. - _Lekraj Beedassy_, Jul 23 2006
%C Numbers n such that the sequence {binomial coefficient C(k,n), k >= n } contains exactly one prime. - _Artur Jasinski_, Dec 02 2007
%C Record values of A143201: a(n) = A143201(A001747(n+1)) for n > 1. - _Reinhard Zumkeller_, Aug 12 2008
%C From _Reinhard Zumkeller_, Jul 10 2009: (Start)
%C The first N terms can be generated by the following sieving process:
%C start with {1, 2, 3, 4, ..., N - 1, N};
%C for i := 1 until SQRT(N) do
%C (if (i is not striked out) then
%C (for j := 2 * i + 1 step i + 1 until N do
%C (strike j from the list)));
%C remaining numbers = {a(n): a(n) <= N}. (End)
%C a(n) = partial sums of A075526(n-1) = Sum_{1..n} A075526(n-1) = Sum_{1..n} (A008578(n+1) - A008578(n)) = Sum_{1..n} (A158611(n+2) - A158611(n+1)) for n >= 1. - _Jaroslav Krizek_, Aug 04 2009
%C A006093 U A072668 = A000027. - _Juri-Stepan Gerasimov_, Oct 22 2009
%C A171400(a(n)) = 1 for n <> 2: subsequence of A171401, except for a(2) = 2. - _Reinhard Zumkeller_, Dec 08 2009
%C Numerator of (1 - 1/prime(n)). - _Juri-Stepan Gerasimov_, Jun 05 2010
%C Numbers n such that A002322(n+1) = n. This statement is stronger than repeating the property of the entries in A002322, because it also says in reciprocity that this sequence here contains no numbers beyond the Carmichael numbers with that property. - _Michel Lagneau_, Dec 12 2010
%C a(n) = A192134(A095874(A000040(n))); subsequence of A192133. - _Reinhard Zumkeller_, Jun 26 2011
%C prime(a(n)) + prime(k) < prime(a(k) + k) for at least one k <= a(n): A212210(a(n),k) < 0. - _Reinhard Zumkeller_, May 05 2012
%C Except for the first term, numbers n such that the sum of first n natural numbers does not divide the product of first n natural numbers; that is, n*(n + 1)/2 does not divide n!. - _Jayanta Basu_, Apr 24 2013
%C BigOmega(a(n)) equals BigOmega(a(n)*(a(n) + 1)/2), where BigOmega = A001222. Rationale: BigOmega of the product on the right hand side factorizes as BigOmega(a/2) + Bigomega(a+1) = BigOmega(a/2) + 1 because a/2 and a + 1 are coprime, because BigOmega is additive, and because a + 1 is prime. Furthermore Bigomega(a/2) = Bigomega(a) - 1 because essentially all 'a' are even. - _Irina Gerasimova_, Jun 06 2013
%C Record values of A060681. - _Omar E. Pol_, Oct 26 2013
%C Deficiency of n-th prime. - _Omar E. Pol_, Jan 30 2014
%C Conjecture: All the sums Sum_{k=s..t} 1/a(k) with 1 <= s <= t are pairwise distinct. In general, for any integers d >= -1 and m > 0, if Sum_{k=i..j} 1/(prime(k)+d)^m = Sum_{k=s..t} 1/(prime(k)+d)^m with 0 < i <= j and 0 < s <= t then we must have (i,j) = (s,t), unless d = m = 1 and {(i,j),(s,t)} = {(4,4),(8,10)} or {(4,7),(5,10)}. (Note that 1/(prime(8)+1)+1/(prime(9)+1)+1/(prime(10)+1) = 1/(prime(4)+1) and Sum_{k=5..10} 1/(prime(k)+1) = 1/(prime(4)+1) + Sum_{k=5..7} 1/(prime(k)+1).) - _Zhi-Wei Sun_, Sep 09 2015
%C Numbers n such that (prime(i)^n + n) is divisible by (n+1), for all i >= 1, except when prime(i) = n+1. - _Richard R. Forberg_, Aug 11 2016
%C a(n) is the period of Fubini numbers (A000670) over the n-th prime. - _Federico Provvedi_, Nov 28 2020
%D Archimedeans Problems Drive, Eureka, 40 (1979), 28.
%D Harvey Dubner, Generalized Fermat primes, J. Recreational Math., 18 (1985): 279-280.
%D M. Gardner, The Colossal Book of Mathematics, pp. 31, W. W. Norton & Co., NY, 2001.
%D M. Gardner, Mathematical Circus, pp. 251-2, Alfred A. Knopf, NY, 1979.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H T. D. Noe, <a href="/A006093/b006093.txt">Table of n, a(n) for n = 1..10000</a>
%H Thomas F. Bloom, <a href="https://arxiv.org/abs/2305.02689">Unit fractions with shifted prime denominators</a>, arXiv:2305.02689 [math.NT], 2023.
%H R. P. Boas & N. J. A. Sloane, <a href="/A005381/a005381.pdf">Correspondence, 1974</a>
%H Harvey Dubner, <a href="/A006093/a006093_1.pdf">Generalized Fermat primes</a>, J. Recreational Math. 18.4 (1985-1986), 279. (Annotated scanned copy)
%H Armel Mercier, <a href="http://www.jstor.org/stable/2323375">Problem E 3065</a>, American Mathematical Monthly, 1984, p. 649.
%H Armel Mercier, S. K. Rangarajan, J. C. Binz and Dan Marcus, <a href="http://www.jstor.org/stable/2323105">Problem E 3065</a>, American Mathematical Monthly, No. 4, 1987, pp. 378.
%H Poo-Sung Park, <a href="https://arxiv.org/abs/1708.03037">Additive uniqueness of PRIMES-1 for multiplicative functions</a>, arXiv:1708.03037 [math.NT], 2017.
%H J. R. Rickard and J. J. Hitchcock, <a href="/A006093/a006093.pdf">Problem Drive 4</a>, Archimedeans Problems Drive, Eureka, 40 (1979), 28-29, 40. (Annotated scanned copy)
%H <a href="/index/Si#sieve">Index entries for sequences generated by sieves</a>
%F a(n) = (p-1)! mod p where p is the n-th prime, by Wilson's theorem. - _Jonathan Sondow_, Jul 13 2010
%F a(n) = A000010(prime(n)) = A000010(A006005(n)). - _Antti Karttunen_, Dec 16 2012
%F a(n) = A005867(n+1)/A005867(n). - _Eric Desbiaux_, May 07 2013
%F a(n) = A000040(n) - 1. - _Omar E. Pol_, Oct 26 2013
%F a(n) = A033879(A000040(n)). - _Omar E. Pol_, Jan 30 2014
%p 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
%p # alternative
%p A006093 := proc(n)
%p ithprime(n)-1 ;
%p end proc:
%p seq(A006093(n),n=1..100) ; # _R. J. Mathar_, Feb 06 2019
%t Table[Prime[n] - 1, {n, 1, 30}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 27 2008 *)
%t a[ n_] := If[ n < 1, 0, -1 + Prime @ n] (* _Michael Somos_, Jul 17 2011 *)
%t Prime[Range[60]] - 1 (* _Alonso del Arte_, Oct 26 2013 *)
%o (PARI) isA006093(n) = isprime(n+1) \\ _Michael B. Porter_, Apr 09 2010
%o (PARI) A006093(n) = prime(n)-1 \\ _Michael B. Porter_, Apr 09 2010
%o (PARI) \\ Sieve as described in Rainer Rosenthal's comment.
%o 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
%o (Haskell)
%o a006093 = (subtract 1) . a000040 -- _Reinhard Zumkeller_, Mar 06 2012
%o (Magma) [NthPrime(n)-1: n in [1..100]]; // _Vincenzo Librandi_, Nov 17 2015
%o (GAP) Filtered([1..280],IsPrime)-1; # _Muniru A Asiru_, Nov 25 2018
%o (Python)
%o from sympy import prime
%o for n in range(1,100): print(prime(n)-1, end=', ') # _Stefano Spezia_, Nov 30 2018
%Y 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_
%Y Cf. A000040, A034694. Different from A075728.
%Y Complement of A072668 (composite numbers minus 1), A072670(a(n))=0.
%Y Essentially the same as A039915.
%Y Cf. A084920, A006093, A050997, A008864, A060800, A131991, A131992, A131993.
%Y Cf. A101301 (partial sums), A005867 (partial products).
%Y Column 1 of the following arrays/triangles: A087738, A249741, A352707, A378979, A379010.
%Y The last diagonal of A162619, and of A174996, the first diagonal in A131424.
%Y Row lengths of irregular triangles A086145, A124223, A212157.
%K nonn,easy,nice
%O 1,2
%A _N. J. A. Sloane_
%E Correction for change of offset in A158611 and A008578 in Aug 2009 _Jaroslav Krizek_, Jan 27 2010
%E Obfuscating comments removed by _Joerg Arndt_, Mar 11 2010
%E Edited by _Charles R Greathouse IV_, Apr 20 2010