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 A260181 #47 Jul 30 2024 06:02:05 %S A260181 2,3,5,7,12,13,15,17,22,23,25,27,32,33,35,37,42,43,45,47,52,53,55,57, %T A260181 62,63,65,67,72,73,75,77,82,83,85,87,92,93,95,97,102,103,105,107,112, %U A260181 113,115,117,122,123,125,127,132,133,135,137,142,143,145,147 %N A260181 Numbers whose last digit is prime. %C A260181 Numbers ending in 2, 3, 5 or 7. %C A260181 The subsequence of primes is A042993. - _Michel Marcus_, Jul 19 2015 %C A260181 From _Wesley Ivan Hurt_, Aug 15 2015, Sep 26 2015: (Start) %C A260181 Ceiling(a(n)/2) = A047201(n). %C A260181 Complement of (A197652 Union A262389). (End) %H A260181 Muniru A Asiru, <a href="/A260181/b260181.txt">Table of n, a(n) for n = 1..5000</a> %H A260181 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1). %F A260181 G.f.: x*(2+x+2*x^2+2*x^3+3*x^4) / ((x-1)^2*(1+x+x^2+x^3)). %F A260181 a(n) = a(n-1)+a(n-4)-a(n-5), n>5. %F A260181 a(n) = (5*n-4-(-1)^n+((3-(-1)^n)/2)*(-1)^((2*n+5-(-1)^n)/4))/2. %F A260181 Sum_{n>=1} (-1)^(n+1)/a(n) = (2*sqrt(5*sqrt(5+2*sqrt(5))) - 25*log(5) - 40*log(2) + 5*sqrt(5)*arccoth(843/2))/200. - _Amiram Eldar_, Jul 30 2024 %p A260181 A260181:=n->(5*n-4-(-1)^n+((3-(-1)^n)/2)*(-1)^((2*n+5-(-1)^n)/4))/2: seq(A260181(n), n=1..100); %t A260181 CoefficientList[Series[(2 + x + 2 x^2 + 2 x^3 + 3 x^4)/((x - 1)^2*(1 + x + x^2 + x^3)), {x, 0, 100}], x] %t A260181 LinearRecurrence[{1, 0, 0, 1, -1}, {2, 3, 5, 7, 12}, 60] (* _Vincenzo Librandi_, Jul 18 2015 *) %t A260181 Table[(5n - 4 - (-1)^n + ((3 - (-1)^n)/2)*(-1)^((2*n + 5 - (-1)^n)/4))/2, {n, 100}] (* _Wesley Ivan Hurt_, Aug 11 2015 *) %o A260181 (Magma) [(5*n-4-(-1)^n+((3-(-1)^n) div 2)*(-1)^((2*n+5-(-1)^n) div 4))/2: n in [1..70]]; // _Vincenzo Librandi_, Jul 18 2015 %o A260181 (PARI) is(n)=my(m=digits(n));isprime(m[#m]) \\ _Anders Hellström_, Jul 19 2015 %o A260181 (PARI) A260181(n)=(n--)\4*10+prime(n%4+1) \\ is(n)=isprime(n%10) is much more efficient than the above. - _M. F. Hasler_, Sep 16 2016 %o A260181 (GAP) a:=n->(5*n-4-(-1)^n+((3-(-1)^n)/2)*(-1)^((2*n+5-(-1)^n)/4))/2; List([1..60],n->a(n)); # _Muniru A Asiru_, Feb 16 2018 %Y A260181 Cf. A042993, A047201, A092620, subset of A118950. %Y A260181 Union of A017293, A017305, A017329 and A017353. %Y A260181 First differences are [1,2,2,5,...] = A002522(A140081(n-1)). %Y A260181 Cf. A197652, A262389. %K A260181 nonn,base,easy %O A260181 1,1 %A A260181 _Wesley Ivan Hurt_, Jul 17 2015