A104275
Numbers k such that 2k-1 is not prime.
Original entry on oeis.org
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
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
-
[n: n in [1..220]| not IsPrime(2*n-1)]; // Vincenzo Librandi, Jan 28 2011
-
remove(t -> isprime(2*t-1), [$1..1000]); # Robert Israel, Apr 17 2015
-
Select[Range[115], !PrimeQ[2#-1] &] (* Robert G. Wilson v, Apr 18 2005 *)
-
select( {is_A104275(n)=!isprime(n*2-1)}, [1..115]) \\ M. F. Hasler, Aug 02 2022
-
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
-
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
-
[n for n in (1..250) if not is_prime(2*n-1)] # G. C. Greubel, Oct 17 2023
-
(define (A104275 n) (if (= 1 n) 1 (A053726 (- n 1)))) ;; More code in A053726. - Antti Karttunen, Apr 17 2015
A053726
"Flag numbers": number of dots that can be arranged in successive rows of K, K-1, K, K-1, K, ..., K-1, K (assuming there is a total of L > 1 rows of size K > 1).
Original entry on oeis.org
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, 116
Offset: 1
Dan Asimov, asimovd(AT)aol.com, Apr 09 2003
Essentially same as
A104275, but without the initial one.
A144650 sorted into ascending order, with duplicates removes.
Cf.
A006254 (complement, apart from 1, which is in neither sequence).
Differs from its subsequence
A246371 for the first time at a(8) = 20, which is missing from
A246371.
-
select( {is_A053726(n)=n>4 && !isprime(n*2-1)}, [1..115]) \\ M. F. Hasler, Aug 02 2022
-
from sympy import isprime
def ok(n): return n > 1 and not isprime(2*n-1)
print(list(filter(ok, range(1, 117)))) # Michael S. Branicky, May 08 2021
-
from sympy import primepi
def A053726(n):
if n == 1: return 5
m, k = n, (r:=primepi(n)) + n + (n>>1)
while m != k:
m, k = k, (r:=primepi(k)) + n + (k>>1)
return r+n # Chai Wah Wu, Aug 02 2024
-
;; with Antti Karttunen's IntSeq-library.
(define A053726 (MATCHING-POS 1 1 (lambda (n) (and (> n 1) (not (prime? (+ n n -1)))))))
;; Antti Karttunen, Apr 17 2015
-
;; with Antti Karttunen's IntSeq-library.
(define (A053726 n) (+ n (A000720 (A071904 n))))
;; Antti Karttunen, Apr 17 2015
More terms from Douglas Winston (douglas.winston(AT)srupc.com), Sep 11 2003
A155151
Triangle T(n, k) = 4*n*k + 2*n + 2*k + 2, read by rows.
Original entry on oeis.org
10, 16, 26, 22, 36, 50, 28, 46, 64, 82, 34, 56, 78, 100, 122, 40, 66, 92, 118, 144, 170, 46, 76, 106, 136, 166, 196, 226, 52, 86, 120, 154, 188, 222, 256, 290, 58, 96, 134, 172, 210, 248, 286, 324, 362, 64, 106, 148, 190, 232, 274, 316, 358, 400, 442, 70, 116, 162
Offset: 1
Triangle begins
10;
16, 26;
22, 36, 50;
28, 46, 64, 82;
34, 56, 78, 100, 122;
40, 66, 92, 118, 144, 170;
46, 76, 106, 136, 166, 196, 226;
52, 86, 120, 154, 188, 222, 256, 290;
58, 96, 134, 172, 210, 248, 286, 324, 362;
64, 106, 148, 190, 232, 274, 316, 358, 400, 442;
-
[4*n*k + 2*n + 2*k + 2: k in [1..n], n in [1..11]]; // Vincenzo Librandi, Nov 21 2012
-
seq(seq( 2*(2*n*k+n+k+1), k=1..n), n=1..15) # G. C. Greubel, Mar 21 2021
-
T[n_,k_]:=4*n*k + 2*n + 2*k + 2; Table[T[n, k], {n, 11}, {k, n}]//Flatten (* Vincenzo Librandi, Nov 21 2012 *)
-
flatten([[2*(2*n*k+n+k+1) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Mar 21 2021
A244418
Triangle read by rows T(n,m) = n*m +(n-1)*(m-1), for n >= m >= 1.
Original entry on oeis.org
1, 2, 5, 3, 8, 13, 4, 11, 18, 25, 5, 14, 23, 32, 41, 6, 17, 28, 39, 50, 61, 7, 20, 33, 46, 59, 72, 85, 8, 23, 38, 53, 68, 83, 98, 113, 9, 26, 43, 60, 77, 94, 111, 128, 145, 10, 29, 48, 67, 86, 105, 124, 143, 162, 181, 11, 32, 53, 74, 95, 116, 137, 158, 179, 200, 221
Offset: 1
The triangle T(n,m) begins:
n\m 1 2 3 4 5 6 7 8 9 10 ...
1: 1
2: 2 5
3: 3 8 13
4: 4 11 18 25
5: 5 14 23 32 41
6: 6 17 28 39 50 61
7: 7 20 33 46 59 72 85
8: 8 23 38 53 68 83 98 113
9: 9 26 43 60 77 94 111 128 145
10: 10 29 48 67 86 105 124 143 162 181 ...
For more rows see the link.
-
tabl(nn) = {for (n=1, nn, for (m=1, n, print1(n*m + (n-1)*(m-1), ", ");); print(););} \\ Michel Marcus, Jan 11 2015
A243907
Numbers that can be expressed as n*m + (n-1)*(m-1), n = 2, 3, ... , m = n, n+1, n+2, ... in at least two different ways. Ordered increasingly.
Original entry on oeis.org
23, 32, 38, 41, 50, 53, 59, 68, 74, 77, 83, 86, 88, 95, 98, 104, 113, 116, 122, 123, 128, 131, 137, 138, 140, 143, 149, 158, 163, 167, 173, 176, 179, 182, 185, 188, 193, 194, 200, 203, 212, 213, 215, 218, 221, 228, 230, 233, 238, 239, 242, 248, 254, 257, 263
Offset: 2
23 = 8*2 + 7*1 = 5*3 +4*2.
32 = 11*2 + 10*1 = 5*4 + 4*3.
The first triple solution is 53 = 18*2 + 17*1 = 11*3 + 10*2 = 8*4 + 7*3.
The sequence
A186041 lists all possible solutions, including single ones, and has four additional terms at the start. The sequence
A140646 also refers to the Stars-and-Stripes, but gives the history, not the geometry of the current arrangement.
Cf. also
A144650, with all values organized by rows (but with different offset).
-
lista(nn=200) = {v = []; vres = []; for (n=2, nn, for (m=2, n, new = n*m + (n-1)*(m-1); if (! vecsearch(v, new), v = vecsort(concat(v, n*m + (n-1)*(m-1))), if (! vecsearch(vres, new), vres = vecsort(concat(vres, new)));););); for (i=1, min(60, #vres), print1(vres[i], ", "));} \\ Michel Marcus, Jun 29 2014
Showing 1-5 of 5 results.
Comments