CINXE.COM

A007310 - OEIS

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <link rel="stylesheet" href="/styles.css"> <meta name="format-detection" content="telephone=no"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name=viewport content="width=device-width, initial-scale=1"> <meta name="keywords" content="OEIS,integer sequences,Sloane" /> <title>A007310 - OEIS</title> <link rel="search" type="application/opensearchdescription+xml" title="OEIS" href="/oeis.xml"> <script> var myURL = "\/A007310" function redir() { var host = document.location.hostname; if(host != "oeis.org" && host != "127.0.0.1" && !/^([0-9.]+)$/.test(host) && host != "localhost" && host != "localhost.localdomain") { document.location = "https"+":"+"//"+"oeis"+".org/" + myURL; } } function sf() { if(document.location.pathname == "/" && document.f) document.f.q.focus(); } </script> </head> <body bgcolor=#ffffff onload="redir();sf()"> <div class=loginbar> <div class=login> <a href="/login?redirect=%2fA007310">login</a> </div> </div> <div class=center><div class=top> <center> <div class=donors> The OEIS is supported by <a href="http://oeisf.org/#DONATE">the many generous donors to the OEIS Foundation</a>. </div> <div class=banner> <a href="/"><img class=banner border="0" width="600" src="/banner2021.jpg" alt="A007310 - OEIS"></a> </div> </center> </div></div> <div class=center><div class=pagebody> <div class=searchbarcenter> <form name=f action="/search" method="GET"> <div class=searchbargreet> <div class=searchbar> <div class=searchq> <input class=searchbox maxLength=1024 name=q value="" title="Search Query"> </div> <div class=searchsubmit> <input type=submit value="Search" name=go> </div> <div class=hints> <span class=hints><a href="/hints.html">Hints</a></span> </div> </div> <div class=searchgreet> (Greetings from <a href="/welcome">The On-Line Encyclopedia of Integer Sequences</a>!) </div> </div> </form> </div> <div class=sequence> <div class=space1></div> <div class=line></div> <div class=seqhead> <div class=seqnumname> <div class=seqnum> A007310 </div> <div class=seqname> Numbers congruent to 1 or 5 mod 6. </div> </div> <div class=scorerefs> 230 </div> </div> <div> <div class=seqdatabox> <div class=seqdata>1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97, 101, 103, 107, 109, 113, 115, 119, 121, 125, 127, 131, 133, 137, 139, 143, 145, 149, 151, 155, 157, 161, 163, 167, 169, 173, 175</div> <div class=seqdatalinks> (<a href="/A007310/list">list</a>; <a href="/A007310/graph">graph</a>; <a href="/search?q=A007310+-id:A007310">refs</a>; <a href="/A007310/listen">listen</a>; <a href="/history?seq=A007310">history</a>; <a href="/search?q=id:A007310&fmt=text">text</a>; <a href="/A007310/internal">internal format</a>) </div> </div> </div> <div class=entry> <div class=section> <div class=sectname>OFFSET</div> <div class=sectbody> <div class=sectline>1,2</div> </div> </div> <div class=section> <div class=sectname>COMMENTS</div> <div class=sectbody> <div class=sectline>Numbers n such that phi(4n) = phi(3n). - <a href="/wiki/User:Benoit_Cloitre">Benoit Cloitre</a>, Aug 06 2003</div> <div class=sectline>Or, numbers relatively prime to 2 and 3, or coprime to 6, or having only prime factors &gt;= 5; also known as 5-rough numbers. (Edited by <a href="/wiki/User:M._F._Hasler">M. F. Hasler</a>, Nov 01 2014: merged with comments from <a href="/wiki/User:Zak_Seidov">Zak Seidov</a>, Apr 26 2007 and <a href="/wiki/User:Michael_B._Porter">Michael B. Porter</a>, Oct 09 2009)</div> <div class=sectline>Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0( 38 ).</div> <div class=sectline>Numbers k such that k mod 2 = 1 and (k+1) mod 3 &lt;&gt; 1. - <a href="/wiki/User:Klaus_Brockhaus">Klaus Brockhaus</a>, Jun 15 2004</div> <div class=sectline>Also numbers n such that the sum of the squares of the first n integers is divisible by n, or <a href="/A000330" title="Square pyramidal numbers: a(n) = 0^2 + 1^2 + 2^2 + ... + n^2 = n*(n+1)*(2*n+1)/6.">A000330</a>(n) = n*(n+1)*(2*n+1)/6 is divisible by n. - <a href="/wiki/User:Alexander_Adamchuk">Alexander Adamchuk</a>, Jan 04 2007</div> <div class=sectline>Numbers n such that the sum of squares of n consecutive integers is divisible by n, because <a href="/A000330" title="Square pyramidal numbers: a(n) = 0^2 + 1^2 + 2^2 + ... + n^2 = n*(n+1)*(2*n+1)/6.">A000330</a>(m+n) - <a href="/A000330" title="Square pyramidal numbers: a(n) = 0^2 + 1^2 + 2^2 + ... + n^2 = n*(n+1)*(2*n+1)/6.">A000330</a>(m) = n*(n+1)*(2*n+1)/6 + n*(m^2+n*m+m) is divisible by n independent of m. - <a href="/wiki/User:Kaupo_Palo">Kaupo Palo</a>, Dec 10 2016</div> <div class=sectline><a href="/A126759" title="a(0) = 1; a(2n) = a(n); a(3n) = a(n); otherwise write n = 6i+j, where j = 1 or 5 and set a(n) = 2i+2 if j = 1, otherwise a(n...">A126759</a>(a(n)) = n + 1. - <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, Jun 16 2008</div> <div class=sectline>Terms of this sequence (starting from the second term) are equal to the result of the expression sqrt(4!*(k+1) + 1) - but only when this expression yields integral values (that is when the parameter k takes values, which are terms of <a href="/A144065" title="Values of k such that the expression sqrt(4!*(k+1) + 1) yields an integer.">A144065</a>). - <a href="/wiki/User:Alexander_R._Povolotsky">Alexander R. Povolotsky</a>, Sep 09 2008</div> <div class=sectline>For n &gt; 1: a(n) is prime if and only if <a href="/A075743" title="For all numbers of the form 6 +- 1 starting with 5,7,11,13,..., '1' indicates prime and '0' indicates composite.">A075743</a>(n-2) = 1; a(2*n-1) = <a href="/A016969" title="a(n) = 6*n + 5.">A016969</a>(n-1), a(2*n) = <a href="/A016921" title="a(n) = 6*n + 1.">A016921</a>(n-1). - <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, Oct 02 2008</div> <div class=sectline><a href="/A156543" title="Multiplicative closure of primes that are not Sophie Germain primes (A053176).">A156543</a> is a subsequence. - <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, Feb 10 2009</div> <div class=sectline>Numbers n such that ChebyshevT(x, x/2) is not an integer (is integer/2). - <a href="/wiki/User:Artur_Jasinski">Artur Jasinski</a>, Feb 13 2010</div> <div class=sectline>If 12*k + 1 is a perfect square (k = 0, 2, 4, 10, 14, 24, 30, 44, ... = <a href="/A152749" title="a(n) = (n+1)*(3*n+1)/4 for n odd, a(n) = n*(3*n+2)/4 for n even.">A152749</a>) then the square root of 12*k + 1 = a(n). - <a href="/wiki/User:Gary_Detlefs">Gary Detlefs</a>, Feb 22 2010</div> <div class=sectline><a href="/A089128" title="a(n) = gcd(6,n).">A089128</a>(a(n)) = 1. Complement of <a href="/A047229" title="Numbers that are congruent to {0, 2, 3, 4} mod 6.">A047229</a>(n+1) for n &gt;= 1. See <a href="/A164576" title="Integer averages of the set of the first positive squares up to some n^2.">A164576</a> for corresponding values <a href="/A175485" title="Numerators of averages of squares of the first n positive integers.">A175485</a>(a(n)). - <a href="/wiki/User:Jaroslav_Krizek">Jaroslav Krizek</a>, May 28 2010</div> <div class=sectline>Cf. property described by <a href="/wiki/User:Gary_Detlefs">Gary Detlefs</a> in <a href="/A113801" title="Numbers that are congruent to {1, 13} mod 14.">A113801</a> and in Comment: more generally, these numbers are of the form (2*h*n+(h-4)*(-1)^n-h)/4 (with h, n natural numbers), therefore ((2*h*n+(h-4)*(-1)^n-h)/4)^2-1 == 0 (mod h); in this case, a(n)^2 - 1 == 0 (mod 6). Also a(n)^2 - 1 == 0 (mod 12). - <a href="/wiki/User:Bruno_Berselli">Bruno Berselli</a>, Nov 05 2010 - Nov 17 2010</div> <div class=sectline>Numbers n such that ( Sum_{k = 1..n} k^14 ) mod n = 0. (Conjectured) - <a href="/wiki/User:Gary_Detlefs">Gary Detlefs</a>, Dec 27 2011</div> <div class=sectline>From <a href="/wiki/User:Peter_Bala">Peter Bala</a>, May 02 2018: (Start)</div> <div class=sectline>The above conjecture is true. Apply Ireland and Rosen, Proposition 15.2.2. with m = 14 to obtain the congruence 6*( Sum_{k = 1..n} k^14 )/n = 7 (mod n), true for all n &gt;= 1. Suppose n is coprime to 6, then 6 is a unit in Z/nZ, and it follows from the congruence that ( Sum_{k = 1..n} k^14 )/n is an integer. On the other hand, if either 2 divides n or 3 divides n then the congruence shows that ( Sum_{k = 1..n} k^14 )/n cannot be integral. (End)</div> <div class=sectline><a href="/A126759" title="a(0) = 1; a(2n) = a(n); a(3n) = a(n); otherwise write n = 6i+j, where j = 1 or 5 and set a(n) = 2i+2 if j = 1, otherwise a(n...">A126759</a>(a(n)) = n and <a href="/A126759" title="a(0) = 1; a(2n) = a(n); a(3n) = a(n); otherwise write n = 6i+j, where j = 1 or 5 and set a(n) = 2i+2 if j = 1, otherwise a(n...">A126759</a>(m) &lt; n for m &lt; a(n). - <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, May 23 2013</div> <div class=sectline>(a(n-1)^2 - 1)/24 = <a href="/A001318" title="Generalized pentagonal numbers: m*(3*m - 1)/2, m = 0, +-1, +-2, +-3, ....">A001318</a>(n), the generalized pentagonal numbers. - <a href="/wiki/User:Richard_R._Forberg">Richard R. Forberg</a>, May 30 2013</div> <div class=sectline>Numbers k for which <a href="/A001580" title="a(n) = 2^n + n^2.">A001580</a>(k) is divisible by 3. - <a href="/wiki/User:Bruno_Berselli">Bruno Berselli</a>, Jun 18 2014</div> <div class=sectline>Numbers n such that sigma(n) + sigma(2n) = sigma(3n). - <a href="/wiki/User:Jahangeer_Kholdi">Jahangeer Kholdi</a> and <a href="/wiki/User:Farideh_Firoozbakht">Farideh Firoozbakht</a>, Aug 15 2014</div> <div class=sectline>a(n) are values of k such that Sum_{m = 1..k-1} m*(k-m)/k is an integer. Sums for those k are given by <a href="/A062717" title="Numbers m such that 6*m+1 is a perfect square.">A062717</a>. Also see Detlefs formula below based on <a href="/A062717" title="Numbers m such that 6*m+1 is a perfect square.">A062717</a>. - <a href="/wiki/User:Richard_R._Forberg">Richard R. Forberg</a>, Feb 16 2015</div> <div class=sectline>a(n) are exactly those positive integers m such that the sequence b(n) = n*(n + m)*(n + 2*m)/6 is integral, and also such that the sequence c(n) = n*(n + m)*(n + 2*m)*(n + 3*m)/24 is integral. Cf. <a href="/A007775" title="Numbers not divisible by 2, 3 or 5.">A007775</a>. - <a href="/wiki/User:Peter_Bala">Peter Bala</a>, Nov 13 2015</div> <div class=sectline>Along with 2, these are the numbers k such that the k-th Fibonacci number is coprime to every Lucas number. - <a href="/wiki/User:Clark_Kimberling">Clark Kimberling</a>, Jun 21 2016</div> <div class=sectline>This sequence is the Engel expansion of 1F2(1; 5/6, 7/6; 1/36) + 1F2(1; 7/6, 11/6; 1/36)/5. - <a href="/wiki/User:Benedict_W._J._Irwin">Benedict W. J. Irwin</a>, Dec 16 2016</div> <div class=sectline>The sequence a(n), n &gt;= 4 is generated by the successor of the pair of polygonal numbers {P_s(4) + 1, P_(2*s - 1)(3) + 1}, s &gt;= 3. - <a href="/wiki/User:Ralf_Steiner">Ralf Steiner</a>, May 25 2018</div> <div class=sectline>The asymptotic density of this sequence is 1/3. - <a href="/wiki/User:Amiram_Eldar">Amiram Eldar</a>, Oct 18 2020</div> <div class=sectline>Also, the only vertices in the odd Collatz tree <a href="/A088975" title="Breadth-first traversal of the Collatz tree, with the odd child of each node traversed prior to its even child. If the Colla...">A088975</a> that are branch values to other odd nodes t == 1 (mod 2) of <a href="/A005408" title="The odd numbers: a(n) = 2*n + 1.">A005408</a>. - <a href="/wiki/User:Heinz_Ebert">Heinz Ebert</a>, Apr 14 2021</div> <div class=sectline>From <a href="/wiki/User:Fl谩vio_V._Fernandes">Fl谩vio V. Fernandes</a>, Aug 01 2021: (Start)</div> <div class=sectline>For any two terms j and k, the product j*k is also a term (the same property as p^n and smooth numbers).</div> <div class=sectline>From a(2) to a(phi(<a href="/A033845" title="Numbers k of the form 2^i*3^j, where i and j &gt;= 1.">A033845</a>(n))), or a((<a href="/A033845" title="Numbers k of the form 2^i*3^j, where i and j &gt;= 1.">A033845</a>(n))/3), the terms are the totatives of the <a href="/A033845" title="Numbers k of the form 2^i*3^j, where i and j &gt;= 1.">A033845</a>(n) itself. (End)</div> <div class=sectline>Also orders n for which cyclic and semicyclic diagonal Latin squares exist (see <a href="/A123565" title="a(n) is the number of positive integers k which are &lt;= n and where k, k-1 and k+1 are each coprime to n.">A123565</a> and <a href="/A342990" title="Number of horizontally or vertically semicyclic diagonal Latin squares of order 2n+1.">A342990</a>). - <a href="/wiki/User:Eduard_I._Vatutin">Eduard I. Vatutin</a>, Jul 11 2023</div> <div class=sectline>If k is in the sequence, then k*2^m + 3 is also in the sequence, for all m &gt; 0. - <a href="/wiki/User:Jules_Beauchamp">Jules Beauchamp</a>, Aug 29 2024</div> </div> </div> <div class=section> <div class=sectname>REFERENCES</div> <div class=sectbody> <div class=sectline>K. Ireland and M. Rosen, A Classical Introduction to Modern Number Theory, Springer-Verlag, 1980.</div> </div> </div> <div class=section> <div class=sectname>LINKS</div> <div class=sectbody> <div class=sectline>Reinhard Zumkeller, <a href="/A007310/b007310.txt">Table of n, a(n) for n = 1..10000</a></div> <div class=sectline>Andreas Enge, William Hart, and Fredrik Johansson, <a href="http://arxiv.org/abs/1608.06810">Short addition sequences for theta functions</a>, arXiv:1608.06810 [math.NT], 2016-2018.</div> <div class=sectline>B. W. J. Irwin, <a href="https://www.authorea.com/users/5445/articles/144462/_show_article">Constants Whose Engel Expansions are the k-rough Numbers</a>.</div> <div class=sectline>L. B. W. Jolley, <a href="https://archive.org/details/summationofserie00joll">Summation of Series</a>, Dover, 1961</div> <div class=sectline>Cedric A. B. Smith, <a href="https://dx.doi.org/10.2307/3616645">Prime factors and recurring duodecimals</a>, Math. Gaz. 59 (408) (1975) 106-109.</div> <div class=sectline>William A. Stein's The Modular Forms Database, <a href="http://wstein.org/Tables/dimensions.html">PARI-readable dimension tables for Gamma_0(N)</a>.</div> <div class=sectline>Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RoughNumber.html">Rough Number</a>.</div> <div class=sectline>Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PiFormulas.html">Pi Formulas</a>. [<a href="/wiki/User:Jaume_Oliver_Lafont">Jaume Oliver Lafont</a>, Oct 23 2009]</div> <div class=sectline><a href="/index/Sk#smooth">Index entries for sequences related to smooth numbers</a> [<a href="/wiki/User:Michael_B._Porter">Michael B. Porter</a>, Oct 09 2009]</div> <div class=sectline><a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).</div> </div> </div> <div class=section> <div class=sectname>FORMULA</div> <div class=sectbody> <div class=sectline>a(n) = (6*n + (-1)^n - 3)/2. - <a href="/wiki/User:Antonio_Esposito">Antonio Esposito</a>, Jan 18 2002</div> <div class=sectline>a(n) = a(n-1) + a(n-2) - a(n-3), n &gt;= 4. - <a href="/wiki/User:Roger_L._Bagula">Roger L. Bagula</a></div> <div class=sectline>a(n) = 3*n - 1 - (n mod 2). - <a href="/wiki/User:Zak_Seidov">Zak Seidov</a>, Jan 18 2006</div> <div class=sectline>a(1) = 1 then alternatively add 4 and 2. a(1) = 1, a(n) = a(n-1) + 3 + (-1)^n. - <a href="/wiki/User:Zak_Seidov">Zak Seidov</a>, Mar 25 2006</div> <div class=sectline>1 + 1/5^2 + 1/7^2 + 1/11^2 + ... = Pi^2/9 [Jolley]. - <a href="/wiki/User:Gary_W._Adamson">Gary W. Adamson</a>, Dec 20 2006</div> <div class=sectline>For n &gt;= 3 a(n) = a(n-2) + 6. - <a href="/wiki/User:Zak_Seidov">Zak Seidov</a>, Apr 18 2007</div> <div class=sectline>From <a href="/wiki/User:R._J._Mathar">R. J. Mathar</a>, May 23 2008: (Start)</div> <div class=sectline>Expand (x+x^5)/(1-x^6) = x + x^5 + x^7 + x^11 + x^13 + ...</div> <div class=sectline>O.g.f.: x*(1+4*x+x^2)/((1+x)*(1-x)^2). (End)</div> <div class=sectline>a(n) = 6*floor(n/2) - 1 + 2*(n mod 2). - <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, Oct 02 2008</div> <div class=sectline>1 + 1/5 - 1/7 - 1/11 + + - - ... = Pi/3 = <a href="/A019670" title="Decimal expansion of Pi/3.">A019670</a> [Jolley eq (315)]. - <a href="/wiki/User:Jaume_Oliver_Lafont">Jaume Oliver Lafont</a>, Oct 23 2009</div> <div class=sectline>a(n) = ( 6*<a href="/A062717" title="Numbers m such that 6*m+1 is a perfect square.">A062717</a>(n)+1 )^(1/2). - <a href="/wiki/User:Gary_Detlefs">Gary Detlefs</a>, Feb 22 2010</div> <div class=sectline>a(n) = 6*<a href="/A000217" title="Triangular numbers: a(n) = binomial(n+1,2) = n*(n+1)/2 = 0 + 1 + 2 + ... + n.">A000217</a>(n-1) + 1 - 2*Sum_{i=1..n-1} a(i), with n &gt; 1. - <a href="/wiki/User:Bruno_Berselli">Bruno Berselli</a>, Nov 05 2010</div> <div class=sectline>a(n) = 6*n - a(n-1) - 6 for n&gt;1, a(1) = 1. - <a href="/wiki/User:Vincenzo_Librandi">Vincenzo Librandi</a>, Nov 18 2010</div> <div class=sectline>Sum_{n &gt;= 1} (-1)^(n+1)/a(n) = <a href="/A093766" title="Decimal expansion of Pi/(2*sqrt(3)).">A093766</a> [Jolley eq (84)]. - <a href="/wiki/User:R._J._Mathar">R. J. Mathar</a>, Mar 24 2011</div> <div class=sectline>a(n) = 6*floor(n/2) + (-1)^(n+1). - <a href="/wiki/User:Gary_Detlefs">Gary Detlefs</a>, Dec 29 2011</div> <div class=sectline>a(n) = 3*n + ((n+1) mod 2) - 2. - <a href="/wiki/User:Gary_Detlefs">Gary Detlefs</a>, Jan 08 2012</div> <div class=sectline>a(n) = 2*n + 1 + 2*floor((n-2)/2) = 2*n - 1 + 2*floor(n/2), leading to the o.g.f. given by <a href="/wiki/User:R._J._Mathar">R. J. Mathar</a> above. - <a href="/wiki/User:Wolfdieter_Lang">Wolfdieter Lang</a>, Jan 20 2012</div> <div class=sectline>1 - 1/5 + 1/7 - 1/11 + - ... = Pi*sqrt(3)/6 = <a href="/A093766" title="Decimal expansion of Pi/(2*sqrt(3)).">A093766</a> (L. Euler). - <a href="/wiki/User:Philippe_Del茅ham">Philippe Del茅ham</a>, Mar 09 2013</div> <div class=sectline>1 - 1/5^3 + 1/7^3 - 1/11^3 + - ... = Pi^3*sqrt(3)/54 (L. Euler). - <a href="/wiki/User:Philippe_Del茅ham">Philippe Del茅ham</a>, Mar 09 2013</div> <div class=sectline>gcd(a(n), 6) = 1. - <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, Nov 14 2013</div> <div class=sectline>a(n) = sqrt(6*n*(3*n + (-1)^n - 3)-3*(-1)^n + 5)/sqrt(2). - <a href="/wiki/User:Alexander_R._Povolotsky">Alexander R. Povolotsky</a>, May 16 2014</div> <div class=sectline>a(n) = 3*n + 6/(9*n mod 6 - 6). - <a href="/wiki/User:Mikk_Heidemaa">Mikk Heidemaa</a>, Feb 05 2016</div> <div class=sectline>From <a href="/wiki/User:Mikk_Heidemaa">Mikk Heidemaa</a>, Feb 11 2016: (Start)</div> <div class=sectline>a(n) = 2*floor(3*n/2) - 1.</div> <div class=sectline>a(n) = <a href="/A047238" title="Numbers that are congruent to {0, 2} mod 6.">A047238</a>(n+1) - 1. (suggested by <a href="/wiki/User:Michel_Marcus">Michel Marcus</a>) (End)</div> <div class=sectline>E.g.f.: (2 + (6*x - 3)*exp(x) + exp(-x))/2. - <a href="/wiki/User:Ilya_Gutkovskiy">Ilya Gutkovskiy</a>, Jun 18 2016</div> <div class=sectline>From <a href="/wiki/User:Bruno_Berselli">Bruno Berselli</a>, Apr 27 2017: (Start)</div> <div class=sectline>a(k*n) = k*a(n) + (4*k + (-1)^k - 3)/2 for k&gt;0 and odd n, a(k*n) = k*a(n) + k - 1 for even n. Some special cases:</div> <div class=sectline>k=2: a(2*n) = 2*a(n) + 3 for odd n, a(2*n) = 2*a(n) + 1 for even n;</div> <div class=sectline>k=3: a(3*n) = 3*a(n) + 4 for odd n, a(3*n) = 3*a(n) + 2 for even n;</div> <div class=sectline>k=4: a(4*n) = 4*a(n) + 7 for odd n, a(4*n) = 4*a(n) + 3 for even n;</div> <div class=sectline>k=5: a(5*n) = 5*a(n) + 8 for odd n, a(5*n) = 5*a(n) + 4 for even n, etc. (End)</div> <div class=sectline>From <a href="/wiki/User:Antti_Karttunen">Antti Karttunen</a>, May 20 2017: (Start)</div> <div class=sectline>a(<a href="/A273669" title="Decimal representation ends with either 2 or 9.">A273669</a>(n)) = 5*a(n) = <a href="/A084967" title="Multiples of 5 whose GCD with 6 is 1.">A084967</a>(n).</div> <div class=sectline>a((5*n)-3) = <a href="/A255413" title="a(n) = 15*n - 11 + (n mod 2). Row 3 of Ludic array A255127.">A255413</a>(n).</div> <div class=sectline><a href="/A126760" title="a(0) = 0, a(2n) = a(n), a(3n) = a(n), a(6n+1) = 2n + 1, a(6n+5) = 2n + 2.">A126760</a>(a(n)) = n. (End)</div> <div class=sectline>a(2*m) = 6*m - 1, m &gt;= 1; a(2*m + 1) = 6*m + 1, m &gt;= 0. - <a href="/wiki/User:Ralf_Steiner">Ralf Steiner</a>, May 17 2018</div> <div class=sectline>From <a href="/wiki/User:Amiram_Eldar">Amiram Eldar</a>, Nov 22 2024: (Start)</div> <div class=sectline>Product_{n&gt;=1} (1 - (-1)^n/a(n)) = sqrt(3) (<a href="/A002194" title="Decimal expansion of sqrt(3).">A002194</a>).</div> <div class=sectline>Product_{n&gt;=2} (1 + (-1)^n/a(n)) = Pi/3 (<a href="/A019670" title="Decimal expansion of Pi/3.">A019670</a>). (End)</div> </div> </div> <div class=section> <div class=sectname>EXAMPLE</div> <div class=sectbody> <div class=sectline>G.f. = x + 5*x^2 + 7*x^3 + 11*x^4 + 13*x^5 + 17*x^6 + 19*x^7 + 23*x^8 + ...</div> </div> </div> <div class=section> <div class=sectname>MAPLE</div> <div class=sectbody> <div class=sectline>seq(seq(6*i+j, j=[1, 5]), i=0..100); # <a href="/wiki/User:Robert_Israel">Robert Israel</a>, Sep 08 2014</div> </div> </div> <div class=section> <div class=sectname>MATHEMATICA</div> <div class=sectbody> <div class=sectline>Select[Range[200], MemberQ[{1, 5}, Mod[#, 6]] &amp;] (* <a href="/wiki/User:Harvey_P._Dale">Harvey P. Dale</a>, Aug 27 2013 *)</div> <div class=sectline>a[n_] := (6 n + (-1)^n - 3)/2; a[rem156, 60] (* <a href="/wiki/User:Robert_G._Wilson_v">Robert G. Wilson v</a>, May 26 2014 from a suggestion by <a href="/wiki/User:N._J._A._Sloane">N. J. A. Sloane</a> *)</div> <div class=sectline>Flatten[Table[6n + {1, 5}, {n, 0, 24}]] (* <a href="/wiki/User:Alonso_del_Arte">Alonso del Arte</a>, Feb 06 2016 *)</div> <div class=sectline>Table[2*Floor[3*n/2] - 1, {n, 1000}] (* <a href="/wiki/User:Mikk_Heidemaa">Mikk Heidemaa</a>, Feb 11 2016 *)</div> </div> </div> <div class=section> <div class=sectname>PROG</div> <div class=sectbody> <div class=sectline>(PARI) isA007310(n) = gcd(n, 6)==1 \\ <a href="/wiki/User:Michael_B._Porter">Michael B. Porter</a>, Oct 09 2009</div> <div class=sectline>(PARI) <a href="/A007310" title="Numbers congruent to 1 or 5 mod 6.">A007310</a>(n)=n\2*6-(-1)^n \\ <a href="/wiki/User:M._F._Hasler">M. F. Hasler</a>, Oct 31 2014</div> <div class=sectline>(PARI) \\ given an element from the sequence, find the next term in the sequence.</div> <div class=sectline>nxt(n) = n + 9/2 - (n%6)/2 \\ <a href="/wiki/User:David_A._Corneth">David A. Corneth</a>, Nov 01 2016</div> <div class=sectline>(Sage) [i for i in range(150) if gcd(6, i) == 1] # <a href="/wiki/User:Zerinvary_Lajos">Zerinvary Lajos</a>, Apr 21 2009</div> <div class=sectline>(Haskell)</div> <div class=sectline>a007310 n = a007310_list !! (n-1)</div> <div class=sectline>a007310_list = 1 : 5 : map (+ 6) a007310_list</div> <div class=sectline>-- <a href="/wiki/User:Reinhard_Zumkeller">Reinhard Zumkeller</a>, Jan 07 2012</div> <div class=sectline>(Magma) [n: n in [1..250] | n mod 6 in [1, 5]]; // <a href="/wiki/User:Vincenzo_Librandi">Vincenzo Librandi</a>, Feb 12 2016</div> <div class=sectline>(GAP) Filtered([1..150], n-&gt;n mod 6=1 or n mod 6=5); # <a href="/wiki/User:Muniru_A_Asiru">Muniru A Asiru</a>, Dec 19 2018</div> <div class=sectline>(Python)</div> <div class=sectline>def <a href="/A007310" title="Numbers congruent to 1 or 5 mod 6.">A007310</a>(n): return (n+(n&gt;&gt;1)&lt;&lt;1)-1 # <a href="/wiki/User:Chai_Wah_Wu">Chai Wah Wu</a>, Oct 10 2023</div> </div> </div> <div class=section> <div class=sectname>CROSSREFS</div> <div class=sectbody> <div class=sectline><a href="/A005408" title="The odd numbers: a(n) = 2*n + 1.">A005408</a> \ <a href="/A016945" title="a(n) = 6*n+3.">A016945</a>. Union of <a href="/A016921" title="a(n) = 6*n + 1.">A016921</a> and <a href="/A016969" title="a(n) = 6*n + 5.">A016969</a>; union of <a href="/A038509" title="Composite numbers congruent to +-1 mod 6.">A038509</a> and <a href="/A140475" title="1 along with primes greater than 3.">A140475</a>. Essentially the same as <a href="/A038179" title="Result of second stage of sieve of Eratosthenes (after eliminating multiples of 2 and 3).">A038179</a>. Complement of <a href="/A047229" title="Numbers that are congruent to {0, 2, 3, 4} mod 6.">A047229</a>. Subsequence of <a href="/A186422" title="First differences of A186421.">A186422</a>.</div> <div class=sectline>Cf. <a href="/A000330" title="Square pyramidal numbers: a(n) = 0^2 + 1^2 + 2^2 + ... + n^2 = n*(n+1)*(2*n+1)/6.">A000330</a>, <a href="/A001580" title="a(n) = 2^n + n^2.">A001580</a>, <a href="/A002194" title="Decimal expansion of sqrt(3).">A002194</a>, <a href="/A019670" title="Decimal expansion of Pi/3.">A019670</a>, <a href="/A032528" title="Concentric hexagonal numbers: floor(3*n^2/2).">A032528</a> (partial sums), <a href="/A038509" title="Composite numbers congruent to +-1 mod 6.">A038509</a> (subsequence of composites), <a href="/A047209" title="Numbers that are congruent to {1, 4} mod 5.">A047209</a>, <a href="/A047336" title="Numbers that are congruent to {1, 6} mod 7.">A047336</a>, <a href="/A047522" title="Numbers that are congruent to {1, 7} mod 8.">A047522</a>, <a href="/A056020" title="Numbers that are congruent to +-1 mod 9.">A056020</a>, <a href="/A084967" title="Multiples of 5 whose GCD with 6 is 1.">A084967</a>, <a href="/A090771" title="Numbers that are congruent to {1, 9} mod 10.">A090771</a>, <a href="/A091998" title="Numbers that are congruent to {1, 11} mod 12.">A091998</a>, <a href="/A144065" title="Values of k such that the expression sqrt(4!*(k+1) + 1) yields an integer.">A144065</a>, <a href="/A175885" title="Numbers that are congruent to {1, 10} mod 11.">A175885</a>-<a href="/A175887" title="Numbers that are congruent to {1, 14} mod 15.">A175887</a>.</div> <div class=sectline>For k-rough numbers with other values of k, see <a href="/A000027" title="The positive integers. Also called the natural numbers, the whole numbers or the counting numbers, but these terms are ambig...">A000027</a>, <a href="/A005408" title="The odd numbers: a(n) = 2*n + 1.">A005408</a>, <a href="/A007775" title="Numbers not divisible by 2, 3 or 5.">A007775</a>, <a href="/A008364" title="11-rough numbers: not divisible by 2, 3, 5 or 7.">A008364</a>-<a href="/A008366" title="Smallest prime factor is &gt;= 17.">A008366</a>, <a href="/A166061" title="19-rough numbers: positive integers that have no prime factors less than 19.">A166061</a>, <a href="/A166063" title="23-rough numbers: positive integers that have no prime factors less than 23.">A166063</a>.</div> <div class=sectline>Cf. <a href="/A126760" title="a(0) = 0, a(2n) = a(n), a(3n) = a(n), a(6n+1) = 2n + 1, a(6n+5) = 2n + 2.">A126760</a> (a left inverse).</div> <div class=sectline>Row 3 of <a href="/A260717" title="Square array: row n gives the numbers remaining before the stage n of Ludic sieve.">A260717</a> (without the initial 1).</div> <div class=sectline>Cf. <a href="/A105397" title="Periodic with period 2: repeat [4,2].">A105397</a> (first differences).</div> <div class=sectline>Sequence in context: <a href="/A067291" title="Numbers n such that prime(n)&gt;n*tau(n) where tau(n) is the number of divisors of n.">A067291</a> <a href="/A286265" title="Totient abundant numbers: numbers k such that A092693(k) &gt; k.">A286265</a> <a href="/A339911" title="Numbers k &gt; 1 for which bigomega(k) &lt;= bigomega(k-1)/2, where bigomega gives the number of prime factors, counted with multi...">A339911</a> * <a href="/A069040" title="Numbers k that divide the numerator of B(2k) (the Bernoulli numbers).">A069040</a> <a href="/A070191" title="Numbers k such that gcd(3*k, 8^k+1) = 3.">A070191</a> <a href="/A367734" title="Numbers that have no balanced divisors except for 1.">A367734</a></div> <div class=sectline>Adjacent sequences: <a href="/A007307" title="a(n) = a(n-2) + a(n-3).">A007307</a> <a href="/A007308" title="Number of crystallographic orbits in n dimensions.">A007308</a> <a href="/A007309" title="a(n)=a(n-2)+a(n-3).">A007309</a> * <a href="/A007311" title="Reversion of o.g.f. for Bell numbers (A000110) omitting a(0)=1.">A007311</a> <a href="/A007312" title="Reversion of g.f. (with constant term omitted) for partition numbers.">A007312</a> <a href="/A007313" title="Reversion of g.f. for Euler (secant) numbers A000364.">A007313</a></div> </div> </div> <div class=section> <div class=sectname>KEYWORD</div> <div class=sectbody> <div class=sectline><span title="a sequence of nonnegative numbers">nonn</span>,<span title="it is very easy to produce terms of sequence">easy</span>,<span title="edited within the last two weeks">changed</span></div> </div> </div> <div class=section> <div class=sectname>AUTHOR</div> <div class=sectbody> <div class=sectline>C. Christofferson (Magpie56(AT)aol.com)</div> </div> </div> <div class=section> <div class=sectname>STATUS</div> <div class=sectbody> <div class=sectline>approved</div> </div> </div> </div> <div class=space10></div> </div> </div></div> <p> <div class=footerpad></div> <div class=footer> <center> <div class=bottom> <div class=linksbar> <a href="/">Lookup</a> <a href="/wiki/Welcome"><font color="red">Welcome</font></a> <a href="/wiki/Main_Page"><font color="red">Wiki</font></a> <a href="/wiki/Special:RequestAccount">Register</a> <a href="/play.html">Music</a> <a href="/plot2.html">Plot 2</a> <a href="/demo1.html">Demos</a> <a href="/wiki/Index_to_OEIS">Index</a> <a href="/webcam">WebCam</a> <a href="/Submit.html">Contribute</a> <a href="/eishelp2.html">Format</a> <a href="/wiki/Style_Sheet">Style Sheet</a> <a href="/transforms.html">Transforms</a> <a href="/ol.html">Superseeker</a> <a href="/recent">Recents</a> </div> <div class=linksbar> <a href="/community.html">The OEIS Community</a> </div> <div class=linksbar> Maintained by <a href="http://oeisf.org">The OEIS Foundation Inc.</a> </div> <div class=dbinfo>Last modified February 17 20:32 EST 2025. Contains 380975 sequences.</div> <div class=legal> <a href="/wiki/Legal_Documents">License Agreements, Terms of Use, Privacy Policy</a> </div> </div> </center> </div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10