# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a045572 Showing 1-1 of 1 %I A045572 #113 Dec 14 2023 05:29:47 %S A045572 1,3,7,9,11,13,17,19,21,23,27,29,31,33,37,39,41,43,47,49,51,53,57,59, %T A045572 61,63,67,69,71,73,77,79,81,83,87,89,91,93,97,99,101,103,107,109,111, %U A045572 113,117,119,121,123,127,129,131,133,137,139,141,143,147,149,151,153 %N A045572 Numbers that are odd but not divisible by 5. %C A045572 Contains the repunits R_n, (A000042 or A002275): For any m in the sequence (divisible by neither 2 nor 5), Euler's theorem (i.e., m | 10^m - 1 = 9*R_n) guarantees that R_n is always some multiple of m (see A099679) and thus forms a subsequence. - _Lekraj Beedassy_, Oct 26 2004 %C A045572 Inverse formula: n = 4*floor(a(n)/10) + floor((a(n) mod 10)/3) + 1. - _Carl R. White_, Feb 06 2008 %C A045572 Numbers ending with 1, 3, 7 or 9. - _Lekraj Beedassy_, Apr 04 2009 %C A045572 Complement of A065502. - _Reinhard Zumkeller_, Nov 15 2009 %C A045572 Union of evenish and oddish numbers, cf. A045797, A045798. - _Reinhard Zumkeller_, Dec 10 2011 %C A045572 Numbers k such that k^(4*j) mod 10 = 1, for any j. - _Gary Detlefs_, Jan 03 2012 %C A045572 Numbers coprime to 10. - _Charles R Greathouse IV_, Sep 05 2013 %C A045572 This is also the sequence of numbers such that all their divisors are the sum of the proper divisors of some number (see A001065 (sum of proper divisors) and A078923 (possible values of sigma(n)-n)). This is due to the fact that in the set of untouchable numbers (A005114) there are only 2 prime numbers (2 and 5) and all other terms are even composite. - _Michel Marcus_, Jun 14 2014 %C A045572 Numbers n for which A001589(n) is divisible by 5. - _Bruno Berselli_, Jun 18 2014 %C A045572 For a(n) > 1, positive integers x such that the decimal representation of 1/x is purely periodic after the decimal point (1/x is a repeating decimal with no non-repeating portion). - _Doug Bell_, Aug 05 2015 %C A045572 The asymptotic density of this sequence is 2/5. - _Amiram Eldar_, Oct 18 2020 %H A045572 Vincenzo Librandi, Table of n, a(n) for n = 1..10000 %H A045572 Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1). %F A045572 a(n) = 10*floor((n-1)/4) + 2*floor( (4*((n-1) mod 4) + 1)/3 ) + 1; a(n) = a(n-1) + 2 + 2*floor(((x+6) mod 10)/9). - _Carl R. White_, Feb 06 2008 %F A045572 a(n) = 2*n + 2*floor((n-3)/4) + 1. - Kenneth Hammond (weregoose(AT)gmail.com), Mar 07 2008 %F A045572 a(n) = -1 + 2*n + 2*floor((n+1)/4). - Kenneth Hammond (weregoose(AT)gmail.com), Mar 25 2008 %F A045572 From _R. J. Mathar_, Sep 22 2009: (Start) %F A045572 a(n) = a(n-1) + a(n-4) - a(n-5). %F A045572 G.f.: x*(1 + 2*x + 4*x^2 + 2*x^3 + x^4)/((1+x) * (x^2+1) * (x-1)^2). (End) %F A045572 A000035(a(n))*(1 - A079998(a(n))) = 1. - _Reinhard Zumkeller_, Nov 15 2009 %F A045572 a(n) = (10*n + 2*(-1)^(n*(n+1)/2) - (-1)^n - 5)/4. - _Bruno Berselli_, Nov 06 2011 %F A045572 G.f.: x * (1 + 2*x + 4*x^2 + 2*x^3 + x^4) / ((1 - x) * (1 - x^4)). - _Michael Somos_, Jun 15 2014 %F A045572 a(1 - n) = -a(n) for all n in Z. - _Michael Somos_, Jun 15 2014 %F A045572 0 = (a(n) - 2*a(n+1) + a(n+2)) * (a(n) - 4*a(n+2) + 3*a(n+3)) for all n in Z. - _Michael Somos_, Jun 15 2014 %F A045572 From _Mikk Heidemaa_, Nov 22 2017: (Start) %F A045572 a(n) = (1/2)*(5*n + ((3*n + 2) mod 4) - 4); %F A045572 a(n) = (1/4)*((-1)^(n + 1) + 10*n + 2*cos((n*Pi)/2) - 2*sin((n*Pi)/2) - 5); %F A045572 a(n) = (1/4)*((-1)^(1 + n) + (1 - i)*exp(-(1/2)*i*n*Pi) + (1 + i)*exp(i*n*Pi/2) + 10*n - 5) (for n > 0), where i is the imaginary unit. (End) %F A045572 Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(10-2*sqrt(5))*Pi/10. - _Amiram Eldar_, Dec 12 2021 %F A045572 E.g.f.: (2 + cos(x) + (5*x - 3)*cosh(x) - sin(x) + (5*x - 2)*sinh(x))/2. - _Stefano Spezia_, Dec 07 2022 %e A045572 a(18) = 10*floor(17/4) + 2*floor( (4*(17 mod 4) + 1)/3 ) + 1 %e A045572 = 10*4 + 2*floor( (4*(1)+1)/3 ) + 1 %e A045572 = 40 + 2*floor(5/3) + 1 %e A045572 = 40 + 2*1 + 1 %e A045572 = 43. %e A045572 G.f. = x + 3*x^2 + 7*x^3 + 9*x^4 + 11*x^5 + 13*x^6 + 17*x^7 + 19*x^8 + ... %p A045572 A045572:=n->2*n + 2*floor((n-3)/4) + 1; seq(A045572(n), n=1..50); # _Wesley Ivan Hurt_, Jun 14 2014 %t A045572 Flatten[Table[10n + {1, 3, 7, 9}, {n, 0, 19}]] (* _Alonso del Arte_, Jan 13 2012 *) %t A045572 Select[2Range@78 -1, Mod[#, 5] > 0 &] (* _Robert G. Wilson v_, Apr 02 2017 *) %t A045572 Map[(1/2*(5*# + Mod[3*# + 2, 4] - 4))&, Range[10^3]] (* _Mikk Heidemaa_, Nov 23 2017 *) %o A045572 (GNU bc) scale=0;for(n=1;n<=100;n++) 10*((n-1)/4)+2*((4*((n-1)%4)+1)/3)+1 /* _Carl R. White_, Feb 06 2008 */ %o A045572 (PARI) a(n)=10*(n>>2)+[-1,1,3,7][n%4+1] \\ _Charles R Greathouse IV_, Jul 31 2011 %o A045572 (PARI) is(n)=gcd(n,10)==1 \\ _Charles R Greathouse IV_, Sep 05 2013 %o A045572 (PARI) {a(n) = 2*n - 1 + (n+1) \ 4 * 2}; /* _Michael Somos_, Jun 15 2014 */ %o A045572 (Magma) [ 2*n + 2*Floor((n-3)/4) + 1: n in [1..70] ]; // _Vincenzo Librandi_, Aug 01 2011 %o A045572 (Haskell) %o A045572 a045572 n = a045572_list !! (n-1) %o A045572 a045572_list = filter ((/= 0) . (`mod` 5)) a005408_list %o A045572 -- _Reinhard Zumkeller_, Dec 10 2011 %o A045572 (Python) %o A045572 def A045572(n): return 2*(n+(n+1)//4) - 1 # _Chai Wah Wu_, Jan 08 2022 %Y A045572 Relative complement of A017329 in A005408. %Y A045572 Cf. A000035, A000042, A001065, A001589, A002275, A005114, A045797, A045798, A065502, A078923, A079998, A082768 (numbers that begin with 1, 3, 7 or 9), A085820, A099679. %K A045572 nonn,easy %O A045572 1,2 %A A045572 _Jeff Burch_, Dec 11 1999 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE