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.

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

This page as a plain text file.
%I A047845 #79 Jul 31 2024 14:41:52
%S A047845 0,4,7,10,12,13,16,17,19,22,24,25,27,28,31,32,34,37,38,40,42,43,45,46,
%T A047845 47,49,52,55,57,58,59,60,61,62,64,66,67,70,71,72,73,76,77,79,80,82,84,
%U A047845 85,87,88,91,92,93,94,97,100,101,102,103,104,106,107,108,109,110,112,115
%N A047845 a(n) = (m-1)/2, where m is the n-th odd nonprime (A014076(n)).
%C A047845 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
%C A047845 Note that if k is not in this sequence, then 2*k+1 is prime. - Jose Brox (tautocrona(AT)terra.es), Dec 29 2005
%C A047845 Values of k for which A073610(2k+3)=0; values of k for which A061358(2k+3)=0. - _Graeme McRae_, Jul 18 2006
%C A047845 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
%C A047845 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
%C A047845 Numbers k such that (2*k)!/(2*k + 1) is an integer. - _Peter Bala_, Jan 24 2017
%C A047845 Except for a(1)=0: numbers of the form k == j (mod 2j+1), j >= 1, k > 2j+1. - _Bob Selcoe_, Nov 07 2017
%H A047845 Reinhard Zumkeller, <a href="/A047845/b047845.txt">Table of n, a(n) for n = 1..10000</a>
%H A047845 Slate, <a href="http://www.slate.com/articles/life/do_the_math/2010/06/13_stripes_and_51_stars.html">Article about USA flag patterns</a> -- this is where Skip Garibaldi gave definitions.
%F A047845 A193773(a(n)) > 1 for n > 1. - _Reinhard Zumkeller_, Jan 02 2013
%p A047845 for n from 0 to 120 do
%p A047845     if irem(factorial(2*n), 2*n+1) = 0 then print(n); end if;
%p A047845 end do:
%p A047845 # _Peter Bala_, Jan 24 2017
%t A047845 (Select[Range[1, 231, 2], PrimeOmega[#] != 1 &] - 1)/2 (* _Jayanta Basu_, Aug 11 2013 *)
%o A047845 (Haskell)
%o A047845 a047845 = (`div` 2) . a014076  -- _Reinhard Zumkeller_, Jan 02 2013
%o A047845 (Magma) [(n-1)/2 : n in [1..350] | (n mod 2) eq 1 and not IsPrime(n)]; // _G. C. Greubel_, Oct 16 2023
%o A047845 (SageMath) [(n-1)/2 for n in (1..350) if n%2==1 and not is_prime(n)] # _G. C. Greubel_, Oct 16 2023
%o A047845 (PARI) print1(0,", ");
%o A047845 forcomposite(n=1,250,if(1==n%2,print1((n-1)/2,", "))); \\ _Joerg Arndt_, Oct 16 2023
%o A047845 (Python)
%o A047845 from sympy import primepi
%o A047845 def A047845(n):
%o A047845     if n == 1: return 0
%o A047845     m, k = n-1, primepi(n) + n - 1 + (n>>1)
%o A047845     while m != k:
%o A047845         m, k = k, primepi(k) + n - 1 + (k>>1)
%o A047845     return m-1>>1 # _Chai Wah Wu_, Jul 31 2024
%Y A047845 Complement of A005097.
%K A047845 easy,nonn
%O A047845 1,2
%A A047845 _Enoch Haga_
%E A047845 Name edited by _Jon E. Schoenfield_, Oct 16 2023