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.

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).

This page as a plain text file.
%I A053726 #50 Oct 23 2024 00:44:00
%S A053726 5,8,11,13,14,17,18,20,23,25,26,28,29,32,33,35,38,39,41,43,44,46,47,
%T A053726 48,50,53,56,58,59,60,61,62,63,65,67,68,71,72,73,74,77,78,80,81,83,85,
%U A053726 86,88,89,92,93,94,95,98,101,102,103,104,105,107,108,109,110,111,113,116
%N 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).
%C A053726 Numbers of the form F(K, L) = KL+(K-1)(L-1), K, L > 1, i.e. 2KL - (K+L) + 1, sorted and duplicates removed.
%C A053726 If K=1, L=1 were allowed, this would contain all positive integers.
%C A053726 Positive numbers > 1 but not of the form (odd primes plus one)/2. - Douglas Winston (douglas.winston(AT)srupc.com), Sep 11 2003
%C A053726 In other words, numbers n such that 2n-1, or equally, A064216(n) is a composite number. - _Antti Karttunen_, Apr 17 2015
%C A053726 Note: the following comment was originally applied in error to the numerically similar A246371. - _Allan C. Wechsler_, Aug 01 2022
%C A053726 From _Matthijs Coster_, Dec 22 2014: (Start)
%C A053726 Also area of (over 45 degree) rotated rectangles with sides > 1. The area of such rectangles is 2ab - a - b + 1 = 1/2((2a-1)(2b-1)+1).
%C A053726 Example: Here a = 3 and b = 5. The area = 23.
%C A053726            *
%C A053726           ***
%C A053726          *****
%C A053726           *****
%C A053726            *****
%C A053726             ***
%C A053726              *
%C A053726 (End)
%C A053726 The smallest integer > k/2 and coprime to k, where k is the n-th odd composite number. - _Mike Jones_, Jul 22 2024
%C A053726 Numbers k such that A193773(k-1) > 1. - _Allan C. Wechsler_, Oct 22 2024
%H A053726 Antti Karttunen, <a href="/A053726/b053726.txt">Table of n, a(n) for n = 1..10000</a>
%F A053726 a(n) = A008508(n) + n + 1.
%F A053726 From _Antti Karttunen_, Apr 17 2015: (Start)
%F A053726 a(n) = n + A000720(A071904(n)). [The above formula reduces to this. A000720(k) gives number of primes <= k, and A071904 gives the n-th odd composite number.]
%F A053726 a(n) = A104275(n+1). (End)
%F A053726 a(n) = A116922(A071904(n)). - _Mike Jones_, Jul 22 2024
%F A053726 a(n) = A047845(n+1)+1. - _Amiram Eldar_, Jul 30 2024
%o A053726 (Scheme) ;; with Antti Karttunen's IntSeq-library.
%o A053726 (define A053726 (MATCHING-POS 1 1 (lambda (n) (and (> n 1) (not (prime? (+ n n -1)))))))
%o A053726 ;; _Antti Karttunen_, Apr 17 2015
%o A053726 (Scheme) ;; with Antti Karttunen's IntSeq-library.
%o A053726 (define (A053726 n) (+ n (A000720 (A071904 n))))
%o A053726 ;; _Antti Karttunen_, Apr 17 2015
%o A053726 (Python)
%o A053726 from sympy import isprime
%o A053726 def ok(n): return n > 1 and not isprime(2*n-1)
%o A053726 print(list(filter(ok, range(1, 117)))) # _Michael S. Branicky_, May 08 2021
%o A053726 (Python)
%o A053726 from sympy import primepi
%o A053726 def A053726(n):
%o A053726     if n == 1: return 5
%o A053726     m, k = n, (r:=primepi(n)) + n + (n>>1)
%o A053726     while m != k:
%o A053726         m, k = k, (r:=primepi(k)) + n + (k>>1)
%o A053726     return r+n # _Chai Wah Wu_, Aug 02 2024
%o A053726 (PARI) select( {is_A053726(n)=n>4 && !isprime(n*2-1)}, [1..115]) \\ _M. F. Hasler_, Aug 02 2022
%Y A053726 Essentially same as A104275, but without the initial one.
%Y A053726 A144650 sorted into ascending order, with duplicates removes.
%Y A053726 Cf. A006254 (complement, apart from 1, which is in neither sequence).
%Y A053726 Cf. also A000720, A008508, A064216, A071904, A199593, A250474.
%Y A053726 Differs from its subsequence A246371 for the first time at a(8) = 20, which is missing from A246371.
%K A053726 nonn,easy
%O A053726 1,1
%A A053726 Dan Asimov, asimovd(AT)aol.com, Apr 09 2003
%E A053726 More terms from Douglas Winston (douglas.winston(AT)srupc.com), Sep 11 2003