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.
%I A007775 #187 Feb 16 2025 08:32:31 %S A007775 1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59,61,67,71,73,77,79,83, %T A007775 89,91,97,101,103,107,109,113,119,121,127,131,133,137,139,143,149,151, %U A007775 157,161,163,167,169,173,179,181,187,191,193,197,199,203,209 %N A007775 Numbers not divisible by 2, 3 or 5. %C A007775 Also numbers n such that the sum of the 4th powers of the first n positive integers is divisible by n, or A000538(n) = n*(n+1)(2*n+1)(3*n^2+3*n-1)/30 is divisible by n. - _Alexander Adamchuk_, Jan 04 2007 %C A007775 Also the 7-rough numbers: positive integers that have no prime factors less than 7. - _Michael B. Porter_, Oct 09 2009 %C A007775 a(n) mod 3 has period 8, repeating [1,1,2,1,2,1,2,2] = (n mod 2) + floor(((n-1) mod 8)/7) - floor(((n-2) mod 8)/7) + 1. floor(a(n)/3) is the set of numbers k such that k is congruent to {0,2,3,4,5,6,7,9} mod 10 = floor((5*n-2)/4)-floor((n mod 8)/6). - _Gary Detlefs_, Jan 08 2012 %C A007775 Numbers k such that C(k+3,3)==1 (mod k) and C(k+5,5)==1 (mod k). - _Gary Detlefs_, Sep 15 2013 %C A007775 a(n) mod 30 has period 8 repeating [1, 7, 11, 13, 17, 19, 23, 29]. The mean of these 8 numbers is 120/8 = 15. (a(n)-15) mod 30 has period 8 repeating [-14, -8, -4, -2, 2, 4, 8, 14]. One half of the absolute value produces the symmetric sequence [7, 4, 2, 1, 1, 2, 4, 7] = A061501(((n-1) + 16) mod 8). - _Gary Detlefs_, Sep 24 2013 %C A007775 a(n) are exactly those positive integers m such that the sequence b(n) = n*(n + m)*(n + 2*m)*(n + 3*m)(n + 4*m)/120 is integral. Cf. A007310. - _Peter Bala_, Nov 13 2015 %C A007775 The asymptotic density of this sequence is 4/15. - _Amiram Eldar_, Sep 30 2020 %C A007775 If a(n) + a(n+1) = 0 (mod 30), then a(n-j) + a(n+j+1) = a(n) + a(n+1) for each j in [1, n-1]. - _Alexandre Herrera_, Jun 27 2023 %H A007775 N. J. A. Sloane, <a href="/A007775/b007775.txt">Table of n, a(n) for n = 1..8000</a> %H A007775 Peter Bala, <a href="/A007775/a007775.pdf">A note on A007775</a>. %H A007775 Abel Jansma, <a href="https://abeljansma.nl/assets/mscThesis.pdf">E_8 Symmetry Structures in the Ising model</a>, Master's thesis, University of Amsterdam, 2018. %H A007775 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RoughNumber.html">Rough Number</a>. %H A007775 <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,1,-1). %H A007775 <a href="/index/Sk#smooth">Index entries for sequences related to smooth numbers</a> %F A007775 A141256(a(n)) = n+1. - _Reinhard Zumkeller_, Jun 17 2008 %F A007775 From _R. J. Mathar_, Feb 27 2009: (Start) %F A007775 a(n+8) = a(n) + 30. %F A007775 a(n) = a(n-1) + a(n-8) - a(n-9). %F A007775 G.f.: x*(1 + 6*x + 4*x^2 + 2*x^3 + 4*x^4 + 2*x^5 + 4*x^6 + 6*x^7 + x^8)/((1 + x)*(x^2 + 1)*(x^4 + 1)*(x-1)^2). (End) %F A007775 a(n) = 4*n - 3 - 2*floor((n-1)/8) + (1 + (-1)^floor((n-2)/2))*(-1)^floor((n-2)/4), n >= 1. - _Timothy Hopper_, Mar 14 2010 %F A007775 a(1 - n) = -a(n). - _Michael Somos_, Feb 05 2011 %F A007775 Numbers k such that ((k^2 mod 48=1) or (k^2 mod 48=25)) and ((k^2 mod 120=1) or (k^2 mod 120=49)). - _Gary Detlefs_, Dec 30 2011 %F A007775 Numbers k such that k^2 mod 30 is 1 or 19. - _Gary Detlefs_, Dec 31 2011 %F A007775 a(n) = 3*(floor((5*n-2)/4) - floor((n mod 8)/6)) + (n mod 2) + floor(((n-1) mod 8)/7) - floor(((n-2) mod 8)/7) + 1. - _Gary Detlefs_, Jan 08 2012 %F A007775 a(n) = 4*n - 3 + 2*(floor((n+6)/8) - floor((n+4)/8) - floor((n+2)/8) + floor(n/8) - floor((n-1)/8)), n >= 1. From the o.g.f. given above by _R. J. Mathar_ (with the denominator written as (1-x^8)*(1-x)), and a two-step reduction of the floor functions. Compare with Hopper's and Detlefs's formulas above. - _Wolfdieter Lang_, Jan 26 2012 %F A007775 a(n) = (6*f(n) - 3 + (-1)^f(n))/2, where f(n)= n + floor(n/4)+ floor(((n+4) mod 8)/6). - _Gary Detlefs_, Sep 15 2013 %F A007775 a(n) = 30*floor((n-1)/8) + 15 + 2*f((n-1) mod 8 + 16)*(-1)^floor(((n+3) mod 8)/4), where f(n) = (n*(n+1)/2+1) mod 10. - _Gary Detlefs_, Sep 24 2013 %F A007775 a(n) = 3*n + 6*floor(n/8) + (n mod 2) - 2*floor(((n-2) mod 8)/6) - 2*floor(((n-2) mod 8)/7) + 1. - _Gary Detlefs_, Jun 01 2014 %F A007775 a(n+1) = ((n << 2 - n >> 2) || 1) + ((n << 1 - n >> 1) && 2), where << and >> are bitwise left and right shifts, || and && are bitwise "or" and "and". - _Andrew Lelechenko_, Jul 08 2017 %F A007775 a(n) = 2*n + 2*floor(1/2 + (7*n)/8) + 2*(91 mod (2 - ((3*n)/4 + n^2/4) mod 2)) - 3 (n > 0). - _Mikk Heidemaa_, Dec 06 2017 %F A007775 Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(23 + sqrt(5) - sqrt(6*(5 + sqrt(5))))*Pi/15. - _Amiram Eldar_, Dec 13 2021 %p A007775 for i from 1 to 500 do if gcd(i,30) = 1 then print(i); fi; od; %p A007775 for k from 1 to 300 do if ((k^2 mod 48=1) or (k^2 mod 48=25)) and ((k^2 mod 120=1) or (k^2 mod 120=49)) then print(k) fi od. # _Gary Detlefs_, Dec 30 2011 %t A007775 Select[ Range[ 300 ], GCD[ #1, 30 ]==1& ] %t A007775 Select[Range[250], Mod[#, 2]>0&&Mod[#, 3]>0&&Mod[#, 5]>0&] (* _Vincenzo Librandi_, Feb 08 2014 *) %t A007775 a[ n_] := Quotient[ n, 8, 1] 30 + {1, 7, 11, 13, 17, 19, 23, 29}[[Mod[n, 8, 1]]]; (* _Michael Somos_, Jun 02 2014 *) %t A007775 LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 1, -1}, {1, 7, 11, 13, 17, 19, 23, 29, 31}, 100] (* _Mikk Heidemaa_, Dec 07 2017 *) %t A007775 Cases[Range@1000, x_ /; NoneTrue[Array[Prime, 3], Divisible[x, #] &]] (* _Mikk Heidemaa_, Dec 07 2017 *) %t A007775 CoefficientList[ Series[(x^8 + 6x^7 + 4x^6 + 2x^5 + 4x^4 + 2x^3 + 4x^2 + 6x + 1)/((x - 1)^2 (x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1)), {x, 0, 55}], x] (* _Robert G. Wilson v_, Dec 07 2017 *) %o A007775 (PARI) isA007775(n) = gcd(n,30)==1 \\ _Michael B. Porter_, Oct 09 2009 %o A007775 (PARI) {a(n) = n\8 * 30 + [ -1, 1, 7, 11, 13, 17, 19, 23][n%8 + 1]} /* _Michael Somos_, Feb 05 2011 */ %o A007775 (PARI) {a(n) = n\8 * 6 + 9 + 3 * (n+1)\2 * 2 - max(5, (n-2)%8) * 2} /* _Michael Somos_, Jun 02 2014 */ %o A007775 (PARI) Vec(x*(1+6*x+4*x^2+2*x^3+4*x^4+2*x^5+4*x^6+6*x^7+x^8)/((1+x)*(x^2+1)*(x^4+1)*( x-1)^2) + O(x^100)) \\ _Altug Alkan_, Nov 16 2015 %o A007775 (Haskell) %o A007775 a007775 n = a007775_list !! (n-1) %o A007775 a007775_list = 1 : filter ((> 5) . a020639) [1..] %o A007775 -- _Reinhard Zumkeller_, Jan 06 2013 %o A007775 (Sage) %o A007775 a = lambda n: ((((n-1)<< 2)-((n-1)>>2))|1) + ((((n-1)<<1)-((n-1)>> 1)) & 2) %o A007775 print([a(n) for n in (1..56)]) # after _Andrew Lelechenko_, _Peter Luschny_, Jul 08 2017 %o A007775 (Magma) I:=[1, 7, 11, 13, 17, 19, 23, 29, 31]; [n le 9 select I[n] else Self(n-1) +Self(n-8) - Self(n-9): n in [1..80]]; // _G. C. Greubel_, Oct 22 2018 %o A007775 (Python) %o A007775 def A007775(n): return ((m:=n-1)<<2|1)-(m>>2&-2)+(2,0,-2,0)[m-1>>1&3] # _Chai Wah Wu_, Feb 02 2025 %Y A007775 Cf. A000538, A054403, A145011 (first differences). %Y A007775 For k-rough numbers with other values of k, see A000027, A005408, A007310, A007775, A008364, A008365, A008366, A166061, A166063. %Y A007775 Complement is A080671. %Y A007775 For digital root of Fibonacci numbers indexed by this sequence, see A227896. %K A007775 nonn,easy %O A007775 1,2 %A A007775 _N. J. A. Sloane_