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.

Showing 1-10 of 10 results.

A047845 a(n) = (m-1)/2, where m is the n-th odd nonprime (A014076(n)).

Original entry on oeis.org

0, 4, 7, 10, 12, 13, 16, 17, 19, 22, 24, 25, 27, 28, 31, 32, 34, 37, 38, 40, 42, 43, 45, 46, 47, 49, 52, 55, 57, 58, 59, 60, 61, 62, 64, 66, 67, 70, 71, 72, 73, 76, 77, 79, 80, 82, 84, 85, 87, 88, 91, 92, 93, 94, 97, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 112, 115
Offset: 1

Views

Author

Keywords

Comments

Also (starting with 2nd term) numbers of the form 2xy+x+y for x and y positive integers. This is also the numbers of sticks needed to construct a two-dimensional rectangular lattice of unit squares. See A090767 for the three-dimensional generalization. - John H. Mason, Feb 02 2004
Note that if k is not in this sequence, then 2*k+1 is prime. - Jose Brox (tautocrona(AT)terra.es), Dec 29 2005
Values of k for which A073610(2k+3)=0; values of k for which A061358(2k+3)=0. - Graeme McRae, Jul 18 2006
This sequence also arises in the following way: take the product of initial odd numbers, i.e., the product (2n+1)!/(n!*2^n) and factor it into prime numbers. The result will be of the form 3^f(3)*5^f(5)*7^f(7)*11^f(11)... . Then f(3)/f(5) = 2, f(3)/f(7) = 3, f(3)/f(11) = 5, ... and this sequence forms (for sufficiently large n, of course) the sequence of natural numbers without 4,7,10,12,..., i.e., these numbers are what is lacking in the present sequence. - Andrzej Staruszkiewicz (uszkiewicz(AT)poczta.onet.pl), Nov 10 2007
Also "flag short numbers", i.e., 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 > 0). Adapting Skip Garibaldi's terms, sequence A053726 would be "flag long numbers" because those patterns begin and end with the long lines. If you convert dots to sticks, you get the lattice that John H. Mason mentioned. - Juhani Heino, Oct 11 2014
Numbers k such that (2*k)!/(2*k + 1) is an integer. - Peter Bala, Jan 24 2017
Except for a(1)=0: numbers of the form k == j (mod 2j+1), j >= 1, k > 2j+1. - Bob Selcoe, Nov 07 2017

Crossrefs

Complement of A005097.

Programs

  • Haskell
    a047845 = (`div` 2) . a014076  -- Reinhard Zumkeller, Jan 02 2013
    
  • Magma
    [(n-1)/2 : n in [1..350] | (n mod 2) eq 1 and not IsPrime(n)]; // G. C. Greubel, Oct 16 2023
    
  • Maple
    for n from 0 to 120 do
        if irem(factorial(2*n), 2*n+1) = 0 then print(n); end if;
    end do:
    # Peter Bala, Jan 24 2017
  • Mathematica
    (Select[Range[1, 231, 2], PrimeOmega[#] != 1 &] - 1)/2 (* Jayanta Basu, Aug 11 2013 *)
  • PARI
    print1(0,", ");
    forcomposite(n=1,250,if(1==n%2,print1((n-1)/2,", "))); \\ Joerg Arndt, Oct 16 2023
    
  • Python
    from sympy import primepi
    def A047845(n):
        if n == 1: return 0
        m, k = n-1, primepi(n) + n - 1 + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n - 1 + (k>>1)
        return m-1>>1 # Chai Wah Wu, Jul 31 2024
  • SageMath
    [(n-1)/2 for n in (1..350) if n%2==1 and not is_prime(n)] # G. C. Greubel, Oct 16 2023
    

Formula

A193773(a(n)) > 1 for n > 1. - Reinhard Zumkeller, Jan 02 2013

Extensions

Name edited by Jon E. Schoenfield, Oct 16 2023

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

Views

Author

Alexandre Wajnberg, Apr 17 2005

Keywords

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

Examples

			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
		

Crossrefs

Cf. A006254 (complement), A246371 (a subsequence).

Programs

  • Magma
    [n: n in [1..220]| not IsPrime(2*n-1)]; // Vincenzo Librandi, Jan 28 2011
    
  • 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 *)
  • PARI
    select( {is_A104275(n)=!isprime(n*2-1)}, [1..115]) \\ M. F. Hasler, Aug 02 2022
    
  • 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
    
  • SageMath
    [n for n in (1..250) if not is_prime(2*n-1)] # G. C. Greubel, Oct 17 2023
  • Scheme
    (define (A104275 n) (if (= 1 n) 1 (A053726 (- n 1)))) ;; More code in A053726. - Antti Karttunen, Apr 17 2015
    

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

Extensions

More terms from Robert G. Wilson v, Apr 18 2005

A246371 Numbers n such that, if 2n-1 = Product_{k >= 1} (p_k)^(c_k) then n > Product_{k >= 1} (p_{k-1})^(c_k), where p_k indicates the k-th prime, A000040(k).

Original entry on oeis.org

5, 8, 11, 13, 14, 17, 18, 23, 28, 32, 38, 39, 41, 43, 50, 53, 58, 59, 61, 63, 68, 73, 74, 77, 83, 86, 88, 94, 95, 98, 104, 113, 116, 122, 123, 128, 131, 137, 138, 140, 143, 149, 158, 163, 167, 172, 173, 176, 179, 182, 185, 188, 193, 194, 200, 203, 212, 213, 215, 218, 221, 228, 230, 233, 238, 239, 242, 248, 254, 257
Offset: 1

Views

Author

Antti Karttunen, Aug 24 2014

Keywords

Comments

Numbers n such that A064216(n) < n.
Numbers n such that A064989(2n-1) < n.
Note: This sequence has remarkable but possibly merely coincidental overlap with A053726. On Dec 22 2014, Matthijs Coster mistakenly attached a comment intended for that sequence to this one. On Apr 17 2015, Antti Karttunen noted the error. I have moved the comment to the correct sequence, and have removed Karttunen's note. - Allan C. Wechsler, Aug 01 2022

Crossrefs

Complement: A246372.
Setwise difference of A246361 and A048674.
Subsequence of A104275 and A053726 (20 is the first term > 1 which is not in this sequence).
Subsequence: A246374 (the primes present in this sequence).

Programs

  • PARI
    default(primelimit, 2^30);
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A064216(n) = A064989((2*n)-1);
    isA246371(n) = (A064216(n) < n);
    n = 0; i = 0; while(i < 10000, n++; if(isA246371(n), i++; write("b246371.txt", i, " ", n)));
    (Scheme, with Antti Karttunen's IntSeq-library)
    (define A246371 (MATCHING-POS 1 1 (lambda (n) (< (A064216 n) n))))

A064233 Numbers that are not the sum of a prime number and a nonzero square.

Original entry on oeis.org

1, 2, 5, 10, 13, 25, 31, 34, 37, 58, 61, 64, 85, 91, 121, 127, 130, 169, 196, 214, 226, 289, 324, 370, 379, 400, 439, 526, 529, 571, 625, 676, 706, 730, 771, 784, 829, 841, 991, 1024, 1089, 1225, 1255, 1351, 1414, 1444, 1521, 1549, 1681, 1849, 1906, 1936, 2116
Offset: 1

Views

Author

Axel Harvey, Sep 22 2001

Keywords

Comments

The sequence is infinite, cf. A014090. Subsequence of squares = A053726^2. Subsequence of nonsquares is disjoint union of A020495 and A065377 and so is probably finite. - Vladeta Jovovic, Apr 02 2005

Examples

			5 = 1+4 or 2+3; a prime and a square do not appear together in either sum.
		

Crossrefs

Complement of A058654.

Programs

  • Mathematica
    Complement[ Table[ n, {n, 1, 10000} ], Union[ Flatten[ Table[ Prime[ i ] + j^2, {i, 1, 1230}, {j, 1, 100} ] ] ] ]
    nspQ[n_]:=Length[Select[IntegerPartitions[n,{2}],(PrimeQ[#[[1]]] && IntegerQ[ Sqrt[ #[[2]]]])||(PrimeQ[#[[2]]]&&IntegerQ[Sqrt[#[[1]]]])&]] == 0; Select[ Range[ 2200],nspQ] (* Harvey P. Dale, Jun 18 2021 *)
  • PARI
    list(lim)=my(v=vectorsmall(lim\1,i,1),u=List(),b);forprime(p=2,#v, b=0; while((t=p+b++^2)<=#v,v[t]=0));for(i=1,#v,if(v[i],listput(u,i))); Vec(u) \\ Charles R Greathouse IV, May 29 2012

Extensions

More terms from Vladeta Jovovic, Robert G. Wilson v and Felice Russo, Sep 23 2001

A008508 Number of odd primes less than n-th odd composite number.

Original entry on oeis.org

3, 5, 7, 8, 8, 10, 10, 11, 13, 14, 14, 15, 15, 17, 17, 18, 20, 20, 21, 22, 22, 23, 23, 23, 24, 26, 28, 29, 29, 29, 29, 29, 29, 30, 31, 31, 33, 33, 33, 33, 35, 35, 36, 36, 37, 38, 38, 39, 39, 41, 41, 41, 41, 43, 45, 45, 45, 45, 45, 46
Offset: 1

Views

Author

Gary Findley (chfindley(AT)alpha.nlu.edu), Mar 15 1996

Keywords

Examples

			The first odd composite is 9, and there are 4 primes below: 2, 3, 5, and 7; so there are 3 odd primes, hence a(1)=3.
		

Crossrefs

Programs

  • Mathematica
    PrimePi[#] - 1 & /@ Select[Range@ 213, CompositeQ@ # && OddQ@ # &] (* Michael De Vlieger, Apr 17 2015 *)
  • PARI
    lista(nn) = {forcomposite (n=1, nn, if (n % 2, print1(primepi(n)-1, ", ")););} \\ Michel Marcus, Apr 18 2015
    
  • Python
    from sympy import primepi
    def A008508(n):
        if n == 1: return 3
        m, k = n, (r:=primepi(n)) + n + (n>>1)
        while m != k:
            m, k = k, (r:=primepi(k)) + n + (k>>1)
        return r-1 # Chai Wah Wu, Aug 01 2024

Formula

From Antti Karttunen, Apr 17 2015: (Start)
a(n) = A000720(A071904(n)) - 1 (by the definition).
a(n) = A053726(n) - n - 1.
(End)

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

Views

Author

Wolfdieter Lang, Jul 10 2014

Keywords

Comments

This table is motivated by an entry of Aki Halme (A243907); see also A053726. a(n,m) is the number of stars on an array similar to the one appearing on the flag of the United States with n columns of m stars interchanged with (n-1) columns of (m-1) stars, for n>=2 and m = 2, ..., n.
The column sequences of the rectangular array R(n,m) = n*m + (n-1)*(m-1) = (2*n-1)*(m-1) + n for n >= 1 and m >= 1 (just symmetrize the given triangular array) are congruent n (mod (2*n-1)), n >= 1. With the odd modulus M = 2*n-1 and for M = d*L, that is d|n and L = (2*n-1)/d one can derive an identity for R(n,m) = d*(L*(m-1) + x) + (n - x*d) = d*k + (d+1)/2 (new modulus d) with k = L*(m-1) + x and n - x*d = (d+1)/2, that is x = ((2*n-1) - d)/(2*d) = (L-1)/2 which is a positive integer because L is odd. Then k = (2*L*m - (L+1))/2, also an integer. Thus for each divisor d of n the identity R(n, m) = R((d+1)/2, k+1) = R((d+1)/2, ((2*m-1)*(2*n-1)/d + 1)/2) holds.
The preceding identity shows that for odd composite moduli M = 2*n - 1 (with nontrivial divisors d of M) the sequence R(n,m), m >= 1 is a subsequence of the one for each modulus d. For example, for M = 15 = 3*5, n = 8, 15*(m-1) + 8 = 3*(5*m-3) + 2 = 5*(3*m-2) + 3 for m >= 1.

Examples

			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.
		

Crossrefs

Cf. A243907, A144650, A053726, A081436 (row sums).

Programs

  • PARI
    tabl(nn) = {for (n=1, nn, for (m=1, n, print1(n*m + (n-1)*(m-1), ", ");); print(););} \\ Michel Marcus, Jan 11 2015

Formula

T(n,m) = n*m + (n-1)*(m-1) = (2*n-1)*(m-1) + n, for n>=m, else 0.
G.f. for column m: G(m, x) = x^m*((2*m^2 - 2*m + 1) - 2*(m - 1)^2*x)/(1 - x)^2.
G.f. for triangle: sum(n >= 1, sum(m = 1..n, T(n,m)*x^m*y^n ) ) = (x*y+1)*(2*x*y^2-x*y-1)*x*y/((-1+y)^2*(x*y-1)^3). - Robert Israel, Jan 11 2015

A199593 Numbers n such that 3n-2, 3n-1 and 3n are all composite.

Original entry on oeis.org

9, 12, 17, 19, 22, 26, 29, 31, 32, 39, 40, 41, 42, 45, 48, 49, 52, 54, 57, 59, 62, 63, 68, 69, 70, 72, 73, 74, 79, 82, 83, 85, 87, 89, 92, 96, 97, 99, 100, 101, 102, 107, 108, 109, 110, 112, 114, 115, 119, 121, 122, 124, 126, 129, 131, 132, 135, 136, 138, 139, 142, 143, 146, 149, 151, 152, 157, 158, 159, 161, 162, 165, 166, 169, 171, 172, 173, 176, 177, 178
Offset: 1

Views

Author

N. J. A. Sloane, Nov 08 2011

Keywords

Comments

From Antti Karttunen, Apr 17 2015: (Start)
Other, equivalent definitions:
Numbers n such that A007310(n) is composite, from which it follows that the function c(1) = 0, c(n) = 1-A075743(n-1) is the characteristic function of this sequence.
Numbers n such that A084967(n) has at least three prime factors (when counted with bigomega, A001222).
Numbers n such that A249823(n) is composite.
(End)
There are n - pi(3n) + 1 terms in this sequence up to n; with an efficient algorithm for pi(x) this allows isolated large values to be computed. Using David Baugh and Kim Walisch's calculation that pi(10^27) = 16352460426841680446427399 one can see that a(316980872906491652886905934) = 333333333333333333333333333 (since 999999999999999999999999997 is composite). - Charles R Greathouse IV, Sep 13 2016

References

Crossrefs

Programs

  • Magma
    [n: n in [1..200] | not IsPrime(3*n) and not IsPrime(3*n-1) and not IsPrime(3*n-2)]; // Vincenzo Librandi, Apr 18 2015
    
  • Maple
    remove(t -> isprime(3*t-1 - (t mod 2)),{$2..2000}); # Robert Israel, Apr 17 2015
  • Mathematica
    Select[Range[200], Union[PrimeQ[{3# - 2, 3# - 1, 3#}]] == {False} &] (* Alonso del Arte, Jul 06 2013 *)
  • PARI
    is(n)=!isprime(bitor(3*n-2,1)) && n>1 \\ Charles R Greathouse IV, Oct 27 2013
    (Scheme, after Greathouse's PARI-program above, requiring also Antti Karttunen's IntSeq-library)
    (define A199593 (MATCHING-POS 1 2 (lambda (n) (not (prime? (A003986bi (+ n n n -2) 1)))))) ;; A003986bi implements binary inclusive or (A003986).
    ;; Antti Karttunen, Apr 17 2015
    
  • Python
    from sympy import isprime
    def ok(n): return n > 0 and not any(isprime(3*n-i) for i in [2, 1, 0])
    print([k for k in range(179) if ok(k)]) # Michael S. Branicky, Apr 16 2022

Formula

((1+(-1)^k)((-1)^n)(2n+3)+2k(6n+9+(-1)^n)+((-1)^k)+(12n^2)+36n+29)/4 n,k are all natural numbers and zero. - Bogart B. Strauss, Jul 10 2013
a(n) = n + 3n/log n + o(n/log n). - Charles R Greathouse IV, Oct 27 2013, corrected Aug 07 2016

A140646 Number of stars on the flag of the United States as it has changed over the years since 1775.

Original entry on oeis.org

0, 13, 15, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 43, 44, 45, 46, 48, 49, 50
Offset: 1

Views

Author

Lane A. Phillips (lanephillips(AT)gmail.com), Jul 09 2008

Keywords

Comments

The flag is also known as the Stars and Stripes, Old Glory and the Star-Spangled Banner.
The proportions of the flag are 10 X 19.

Examples

			In 2008 the flag has 50 stars and 13 stripes.
		

Crossrefs

Cf. A053726.

Extensions

Edited by N. J. A. Sloane, Jul 31 2008

A186041 Numbers of the form 3*k + 2, 5*k + 3, or 7*k + 4.

Original entry on oeis.org

2, 3, 4, 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, 62, 63, 65, 67, 68, 71, 73, 74, 77, 78, 80, 81, 83, 86, 88, 89, 92, 93, 95, 98, 101, 102, 103, 104, 107, 108, 109, 110, 113, 116, 118, 119, 122
Offset: 1

Views

Author

Klaus Brockhaus, Feb 11 2011, Mar 09 2011

Keywords

Comments

n is in the sequence iff n is in A016789 or in A016885 or in A017029.
First differences are periodic with period length 57. Least common multiple of 3, 5, 7 is 105; number of terms <= 105 is 57.
Sequence is not essentially the same as A053726: a(n) = A053726(n-3) for 3 < n < 33, a(34)=62, A053726(34-3)=61.
Sequence is not essentially the same as A104275: a(n) = A104275(n-2) for 3 < n < 33, a(34)=62, A104275(34-3)=61.

Crossrefs

Programs

  • Magma
    IsA186041:=func< n | exists{ k: k in [0..n div 3] | n in [3*k+2, 5*k+3, 7*k+4] } >; [ n: n in [1..200] | IsA186041(n) ];
  • Mathematica
    Take[With[{no=50},Union[Join[3Range[0,no]+2,5Range[0,no]+3,7Range[0,no]+4]]],70]  (* Harvey P. Dale, Feb 16 2011 *)

Formula

a(n) = a(n-57) + 105.
a(n) = a(n-1) + a(n-57) - a(n-58).
G.f.: x*(x^57 + x^56 + x^55 + x^54 + 3*x^53 + 3*x^52 + 2*x^51 + x^50 + 3*x^49 + x^48 + 2*x^47 + 3*x^46 + 2*x^45 + x^44 + 2*x^43 + x^42 + 3*x^41 + x^40 + 2*x^39 + 3*x^38 + x^37 + 2*x^36 + 2*x^35 + x^34 + 2*x^33 + x^32 + x^31 + 2*x^30 + 3*x^29 + 3*x^28 + 2*x^27 + x^26 + x^25 + 2*x^24 + x^23 + 2*x^22 + 2*x^21 + x^20 + 3*x^19 + 2*x^18 + x^17 + 3*x^16 + x^15 + 2*x^14 + x^13 + 2*x^12 + 3*x^11 + 2*x^10 + x^9 + 3*x^8 + x^7 + 2*x^6 + 3*x^5 + 3*x^4 + x^3 + x^2 + x + 2) / ((x - 1)^2*(x^2 + x + 1)*(x^18 + x^17 + x^16 + x^15 + x^14 + x^13 + x^12 + x^11 + x^10 + x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1)*(x^36 - x^35 + x^33 - x^32 + x^30 - x^29 + x^27 - x^26 + x^24 - x^23 + x^21 - x^20 + x^18 - x^16 + x^15 - x^13 + x^12 - x^10 + x^9 - x^7 + x^6 - x^4 + x^3 - x + 1)).

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

Views

Author

Aki Halme, Jun 14 2014

Keywords

Comments

This sequence was inspired by the flag of the United States. The 50 stars are placed in a rectangular grid with outside dimensions six stars wide by five stars high, but they could also be placed in a grid 17 stars wide by two stars high. This sequence lists, up to 200 stars, all numbers of stars that could be placed in a rectangular field in more than one arrangement.
This is the ordered list of integers that appear several times in A144650.
R(n,m) = n*m + (n-1)*(m-1) = (m-1)*(2*n-1) + n == n (mod (2*n-1)), and also with n interchanged with m. See A244418 for the table a(n,m) = R(n,m) for n >= m >= 1. - Wolfdieter Lang, Jul 10 2014

Examples

			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.
		

Crossrefs

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

Programs

  • PARI
    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

Extensions

More terms from Michel Marcus, Jun 29 2014
Edited. Title reformulated. Crossrefs A053726 and A244418 added. - Wolfdieter Lang, Jul 10 2014
Showing 1-10 of 10 results.