login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007310 Numbers congruent to 1 or 5 mod 6. 218

%I #479 Apr 17 2024 11:14:12

%S 1,5,7,11,13,17,19,23,25,29,31,35,37,41,43,47,49,53,55,59,61,65,67,71,

%T 73,77,79,83,85,89,91,95,97,101,103,107,109,113,115,119,121,125,127,

%U 131,133,137,139,143,145,149,151,155,157,161,163,167,169,173,175

%N Numbers congruent to 1 or 5 mod 6.

%C Numbers n such that phi(4n) = phi(3n). - _Benoit Cloitre_, Aug 06 2003

%C Or, numbers relatively prime to 2 and 3, or coprime to 6, or having only prime factors >= 5; also known as 5-rough numbers. (Edited by _M. F. Hasler_, Nov 01 2014: merged with comments from _Zak Seidov_, Apr 26 2007 and _Michael B. Porter_, Oct 09 2009)

%C Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0( 38 ).

%C Numbers k such that k mod 2 = 1 and (k+1) mod 3 <> 1. - _Klaus Brockhaus_, Jun 15 2004

%C Also numbers n such that the sum of the squares of the first n integers is divisible by n, or A000330(n) = n*(n+1)*(2*n+1)/6 is divisible by n. - _Alexander Adamchuk_, Jan 04 2007

%C Numbers n such that the sum of squares of n consecutive integers is divisible by n, because A000330(m+n) - A000330(m) = n*(n+1)*(2*n+1)/6 + n*(m^2+n*m+m) is divisible by n independent of m. - _Kaupo Palo_, Dec 10 2016

%C A126759(a(n)) = n + 1. - _Reinhard Zumkeller_, Jun 16 2008

%C 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 A144065). - _Alexander R. Povolotsky_, Sep 09 2008

%C For n > 1: a(n) is prime if and only if A075743(n-2) = 1; a(2*n-1) = A016969(n-1), a(2*n) = A016921(n-1). - _Reinhard Zumkeller_, Oct 02 2008

%C A156543 is a subsequence. - _Reinhard Zumkeller_, Feb 10 2009

%C Numbers n such that ChebyshevT(x, x/2) is not an integer (is integer/2). - _Artur Jasinski_, Feb 13 2010

%C If 12*k + 1 is a perfect square (k = 0, 2, 4, 10, 14, 24, 30, 44, ... = A152749) then the square root of 12*k + 1 = a(n). - _Gary Detlefs_, Feb 22 2010

%C A089128(a(n)) = 1. Complement of A047229(n+1) for n >= 1. See A164576 for corresponding values A175485(a(n)). - _Jaroslav Krizek_, May 28 2010

%C Cf. property described by _Gary Detlefs_ in A113801 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). - _Bruno Berselli_, Nov 05 2010 - Nov 17 2010

%C Numbers n such that ( Sum_{k = 1..n} k^14 ) mod n = 0. (Conjectured) - _Gary Detlefs_, Dec 27 2011

%C From _Peter Bala_, May 02 2018: (Start)

%C 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 >= 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)

%C A126759(a(n)) = n and A126759(m) < n for m < a(n). - _Reinhard Zumkeller_, May 23 2013

%C (a(n-1)^2 - 1)/24 = A001318(n), the generalized pentagonal numbers. - _Richard R. Forberg_, May 30 2013

%C Numbers k for which A001580(k) is divisible by 3. - _Bruno Berselli_, Jun 18 2014

%C Numbers n such that sigma(n) + sigma(2n) = sigma(3n). - _Jahangeer Kholdi_ and _Farideh Firoozbakht_, Aug 15 2014

%C 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 A062717. Also see Detlefs formula below based on A062717. - _Richard R. Forberg_, Feb 16 2015

%C 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. A007775. - _Peter Bala_, Nov 13 2015

%C Along with 2, these are the numbers k such that the k-th Fibonacci number is coprime to every Lucas number. - _Clark Kimberling_, Jun 21 2016

%C This sequence is the Engel expansion of 1F2(1; 5/6, 7/6; 1/36) + 1F2(1; 7/6, 11/6; 1/36)/5. - _Benedict W. J. Irwin_, Dec 16 2016

%C The sequence a(n), n >= 4 is generated by the successor of the pair of polygonal numbers {P_s(4) + 1, P_(2*s - 1)(3) + 1}, s >= 3. - _Ralf Steiner_, May 25 2018

%C The asymptotic density of this sequence is 1/3. - _Amiram Eldar_, Oct 18 2020

%C Also, the only vertices in the odd Collatz tree A088975 that are branch values to other odd nodes t == 1 (mod 2) of A005408. - _Heinz Ebert_, Apr 14 2021

%C From _Flávio V. Fernandes_, Aug 01 2021: (Start)

%C For any two terms j and k, the product j*k is also a term (the same property as p^n and smooth numbers).

%C From a(2) to a(phi(A033845(n))), or a((A033845(n))/3), the terms are the totatives of the A033845(n) itself. (End)

%C Also orders n for which cyclic and semicyclic diagonal Latin squares exist (see A123565 and A342990). - _Eduard I. Vatutin_, Jul 11 2023

%D K. Ireland and M. Rosen, A Classical Introduction to Modern Number Theory, Springer-Verlag, 1980.

%H Reinhard Zumkeller, <a href="/A007310/b007310.txt">Table of n, a(n) for n = 1..10000</a>

%H 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.

%H 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>.

%H L. B. W. Jolley, <a href="https://archive.org/details/summationofserie00joll">Summation of Series</a>, Dover, 1961

%H 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.

%H 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>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RoughNumber.html">Rough Number</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PiFormulas.html">Pi Formulas</a>. [_Jaume Oliver Lafont_, Oct 23 2009]

%H <a href="/index/Sk#smooth">Index entries for sequences related to smooth numbers</a> [_Michael B. Porter_, Oct 09 2009]

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).

%F a(n) = (6*n + (-1)^n - 3)/2. - _Antonio Esposito_, Jan 18 2002

%F a(n) = a(n-1) + a(n-2) - a(n-3), n >= 4. - _Roger L. Bagula_

%F a(n) = 3*n - 1 - (n mod 2). - _Zak Seidov_, Jan 18 2006

%F a(1) = 1 then alternatively add 4 and 2. a(1) = 1, a(n) = a(n-1) + 3 + (-1)^n. - _Zak Seidov_, Mar 25 2006

%F 1 + 1/5^2 + 1/7^2 + 1/11^2 + ... = Pi^2/9 [Jolley]. - _Gary W. Adamson_, Dec 20 2006

%F For n >= 3 a(n) = a(n-2) + 6. - _Zak Seidov_, Apr 18 2007

%F From _R. J. Mathar_, May 23 2008: (Start)

%F Expand (x+x^5)/(1-x^6) = x + x^5 + x^7 + x^11 + x^13 + ...

%F O.g.f.: x*(1+4*x+x^2)/((1+x)*(1-x)^2). (End)

%F a(n) = 6*floor(n/2) - 1 + 2*(n mod 2). - _Reinhard Zumkeller_, Oct 02 2008

%F 1 + 1/5 - 1/7 - 1/11 + + - - ... = Pi/3 = A019670 [Jolley eq (315)]. - _Jaume Oliver Lafont_, Oct 23 2009

%F a(n) = ( 6*A062717(n)+1 )^(1/2). - _Gary Detlefs_, Feb 22 2010

%F a(n) = 6*A000217(n-1) + 1 - 2*Sum_{i=1..n-1} a(i), with n > 1. - _Bruno Berselli_, Nov 05 2010

%F a(n) = 6*n - a(n-1) - 6 for n>1, a(1) = 1. - _Vincenzo Librandi_, Nov 18 2010

%F Sum_{n >= 1} (-1)^(n+1)/a(n) = A093766 [Jolley eq (84)]. - _R. J. Mathar_, Mar 24 2011

%F a(n) = 6*floor(n/2) + (-1)^(n+1). - _Gary Detlefs_, Dec 29 2011

%F a(n) = 3*n + ((n+1) mod 2) - 2. - _Gary Detlefs_, Jan 08 2012

%F 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 _R. J. Mathar_ above. - _Wolfdieter Lang_, Jan 20 2012

%F 1 - 1/5 + 1/7 - 1/11 + - ... = Pi*sqrt(3)/6 = A093766 (L. Euler). - _Philippe Deléham_, Mar 09 2013

%F 1 - 1/5^3 + 1/7^3 - 1/11^3 + - ... = Pi^3*sqrt(3)/54 (L. Euler). - _Philippe Deléham_, Mar 09 2013

%F gcd(a(n), 6) = 1. - _Reinhard Zumkeller_, Nov 14 2013

%F a(n) = sqrt(6*n*(3*n + (-1)^n - 3)-3*(-1)^n + 5)/sqrt(2). - _Alexander R. Povolotsky_, May 16 2014

%F a(n) = 3*n + 6/(9*n mod 6 - 6). - _Mikk Heidemaa_, Feb 05 2016

%F From _Mikk Heidemaa_, Feb 11 2016: (Start)

%F a(n) = 2*floor(3*n/2) - 1.

%F a(n) = A047238(n+1) - 1. (suggested by _Michel Marcus_) (End)

%F E.g.f.: (2 + (6*x - 3)*exp(x) + exp(-x))/2. - _Ilya Gutkovskiy_, Jun 18 2016

%F From _Bruno Berselli_, Apr 27 2017: (Start)

%F a(k*n) = k*a(n) + (4*k + (-1)^k - 3)/2 for k>0 and odd n, a(k*n) = k*a(n) + k - 1 for even n. Some special cases:

%F k=2: a(2*n) = 2*a(n) + 3 for odd n, a(2*n) = 2*a(n) + 1 for even n;

%F k=3: a(3*n) = 3*a(n) + 4 for odd n, a(3*n) = 3*a(n) + 2 for even n;

%F k=4: a(4*n) = 4*a(n) + 7 for odd n, a(4*n) = 4*a(n) + 3 for even n;

%F k=5: a(5*n) = 5*a(n) + 8 for odd n, a(5*n) = 5*a(n) + 4 for even n, etc. (End)

%F From _Antti Karttunen_, May 20 2017: (Start)

%F a(A273669(n)) = 5*a(n) = A084967(n).

%F a((5*n)-3) = A255413(n).

%F A126760(a(n)) = n. (End)

%F a(2*m) = 6*m - 1, m >= 1; a(2*m + 1) = 6*m + 1, m >= 0. - _Ralf Steiner_, May 17 2018

%e G.f. = x + 5*x^2 + 7*x^3 + 11*x^4 + 13*x^5 + 17*x^6 + 19*x^7 + 23*x^8 + ...

%p seq(seq(6*i+j,j=[1,5]),i=0..100); # _Robert Israel_, Sep 08 2014

%t Select[Range[200], MemberQ[{1, 5}, Mod[#, 6]] &] (* _Harvey P. Dale_, Aug 27 2013 *)

%t a[n_] := (6 n + (-1)^n - 3)/2; a[rem156, 60] (* _Robert G. Wilson v_, May 26 2014 from a suggestion by _N. J. A. Sloane_ *)

%t Flatten[Table[6n + {1, 5}, {n, 0, 24}]] (* _Alonso del Arte_, Feb 06 2016 *)

%t Table[2*Floor[3*n/2] - 1, {n, 1000}] (* _Mikk Heidemaa_, Feb 11 2016 *)

%o (PARI) isA007310(n) = gcd(n,6)==1 \\ _Michael B. Porter_, Oct 09 2009

%o (PARI) A007310(n)=n\2*6-(-1)^n \\ _M. F. Hasler_, Oct 31 2014

%o (PARI) \\ given an element from the sequence, find the next term in the sequence.

%o nxt(n) = n + 9/2 - (n%6)/2 \\ _David A. Corneth_, Nov 01 2016

%o (Sage) [i for i in range(150) if gcd(6,i) == 1] # _Zerinvary Lajos_, Apr 21 2009

%o (Haskell)

%o a007310 n = a007310_list !! (n-1)

%o a007310_list = 1 : 5 : map (+ 6) a007310_list

%o -- _Reinhard Zumkeller_, Jan 07 2012

%o (Magma) [n: n in [1..250] | n mod 6 in [1, 5]]; // _Vincenzo Librandi_, Feb 12 2016

%o (GAP) Filtered([1..150],n->n mod 6=1 or n mod 6=5); # _Muniru A Asiru_, Dec 19 2018

%o (Python)

%o def A007310(n): return (n+(n>>1)<<1)-1 # _Chai Wah Wu_, Oct 10 2023

%Y A005408 \ A016945. Union of A016921 and A016969; union of A038509 and A140475. Essentially the same as A038179. Complement of A047229. Subsequence of A186422.

%Y Cf. A000330, A001580, A032528 (partial sums), A038509 (subsequence of composites), A047209, A047336, A047522, A056020, A084967, A090771, A091998, A144065, A175885-A175887.

%Y For k-rough numbers with other values of k, see A000027, A005408, A007775, A008364-A008366, A166061, A166063.

%Y Cf. A126760 (a left inverse).

%Y Row 3 of A260717 (without the initial 1).

%Y Cf. A105397 (first differences).

%K nonn,easy,changed

%O 1,2

%A C. Christofferson (Magpie56(AT)aol.com)

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 00:26 EDT 2024. Contains 371798 sequences. (Running on oeis4.)