login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A104275
Numbers k such that 2k-1 is not prime.
15
1, 5, 8, 11, 13, 14, 17, 18, 20, 23, 25, 26, 28, 29, 32, 33, 35, 38, 39, 41, 43, 44, 46, 47, 48, 50, 53, 56, 58, 59, 60, 61, 62, 63, 65, 67, 68, 71, 72, 73, 74, 77, 78, 80, 81, 83, 85, 86, 88, 89, 92, 93, 94, 95, 98, 101, 102, 103, 104, 105, 107, 108, 109, 110, 111, 113
OFFSET
1,2
COMMENTS
Same as A053726 except for the first term of this sequence.
Numbers k such that A064216(k) is not prime. - Antti Karttunen, Apr 17 2015
Union of 1 and terms of the form (u+1)*(v+1) + u*v with 1 <= u <= v. - Ralf Steiner, Nov 17 2021
LINKS
Vincenzo Librandi (first 1000 terms) & Antti Karttunen, Table of n, a(n) for n = 1..10001
FORMULA
a(n) = A047845(n-1) + 1.
For n > 1, a(n) = A053726(n-1) = n + A008508(n-1). - Antti Karttunen, Apr 17 2015
a(n) = (A014076(n)+1)/2. - Robert Israel, Apr 17 2015
EXAMPLE
a(1) = 1 because 2*1-1=1, not prime.
a(2) = 5 because 2*5-1=9, not prime (2, 3 and 4 give 3, 5 and 7 which are primes).
From Vincenzo Librandi, Jan 15 2013: (Start)
As a triangular array (apart from term 1):
5;
8, 13;
11, 18, 25;
14, 23, 32, 41;
17, 28, 39, 50, 61;
20, 33, 46, 59, 72, 85;
23, 38, 53, 68, 83, 98, 113;
26, 43, 60, 77, 94, 111, 128, 145;
29, 48, 67, 86, 105, 124, 143, 162, 181;
32, 53, 74, 95, 116, 137, 158, 179, 200, 221; etc.
which is obtained by (2*h*k + k + h + 1) with h >= k >= 1. (End)
The above array, which contains the same terms as A053726 but in different order and with some duplicates, has its own entry A144650. - Antti Karttunen, Apr 17 2015
MAPLE
remove(t -> isprime(2*t-1), [$1..1000]); # Robert Israel, Apr 17 2015
MATHEMATICA
Select[Range[115], !PrimeQ[2#-1] &] (* Robert G. Wilson v, Apr 18 2005 *)
PROG
(Magma) [n: n in [1..220]| not IsPrime(2*n-1)]; // Vincenzo Librandi, Jan 28 2011
(Scheme) (define (A104275 n) (if (= 1 n) 1 (A053726 (- n 1)))) ;; More code in A053726. - Antti Karttunen, Apr 17 2015
(Python)
from sympy import isprime
def ok(n): return not isprime(2*n-1)
print(list(filter(ok, range(1, 114)))) # Michael S. Branicky, May 08 2021
(Python)
from sympy import primepi
def A104275(n):
if n <= 2: return ((n-1)<<2)+1
m, k = n-1, (r:=primepi(n-1)) + n - 1 + (n-1>>1)
while m != k:
m, k = k, (r:=primepi(k)) + n - 1 + (k>>1)
return r+n-1 # Chai Wah Wu, Aug 02 2024
(PARI) select( {is_A104275(n)=!isprime(n*2-1)}, [1..115]) \\ M. F. Hasler, Aug 02 2022
(SageMath) [n for n in (1..250) if not is_prime(2*n-1)] # G. C. Greubel, Oct 17 2023
CROSSREFS
Cf. A006254 (complement), A246371 (a subsequence).
Sequence in context: A189577 A047700 A294675 * A053726 A246371 A274939
KEYWORD
easy,nonn
AUTHOR
Alexandre Wajnberg, Apr 17 2005
EXTENSIONS
More terms from Robert G. Wilson v, Apr 18 2005
STATUS
approved