cp's OEIS Frontend

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.

Showing 1-5 of 5 results.

A260181 Numbers whose last digit is prime.

Original entry on oeis.org

2, 3, 5, 7, 12, 13, 15, 17, 22, 23, 25, 27, 32, 33, 35, 37, 42, 43, 45, 47, 52, 53, 55, 57, 62, 63, 65, 67, 72, 73, 75, 77, 82, 83, 85, 87, 92, 93, 95, 97, 102, 103, 105, 107, 112, 113, 115, 117, 122, 123, 125, 127, 132, 133, 135, 137, 142, 143, 145, 147
Offset: 1

Views

Author

Wesley Ivan Hurt, Jul 17 2015

Keywords

Comments

Numbers ending in 2, 3, 5 or 7.
The subsequence of primes is A042993. - Michel Marcus, Jul 19 2015
From Wesley Ivan Hurt, Aug 15 2015, Sep 26 2015: (Start)
Ceiling(a(n)/2) = A047201(n).
Complement of (A197652 Union A262389). (End)

Crossrefs

Cf. A042993, A047201, A092620, subset of A118950.
Union of A017293, A017305, A017329 and A017353.
First differences are [1,2,2,5,...] = A002522(A140081(n-1)).

Programs

  • 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
  • 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
    
  • Maple
    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);
  • Mathematica
    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]
    LinearRecurrence[{1, 0, 0, 1, -1}, {2, 3, 5, 7, 12}, 60] (* Vincenzo Librandi, Jul 18 2015 *)
    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 *)
  • PARI
    is(n)=my(m=digits(n));isprime(m[#m]) \\ Anders Hellström, Jul 19 2015
    
  • 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
    

Formula

G.f.: x*(2+x+2*x^2+2*x^3+3*x^4) / ((x-1)^2*(1+x+x^2+x^3)).
a(n) = a(n-1)+a(n-4)-a(n-5), n>5.
a(n) = (5*n-4-(-1)^n+((3-(-1)^n)/2)*(-1)^((2*n+5-(-1)^n)/4))/2.
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

A219259 Numbers k such that 25*k+1 is a square.

Original entry on oeis.org

0, 23, 27, 96, 104, 219, 231, 392, 408, 615, 635, 888, 912, 1211, 1239, 1584, 1616, 2007, 2043, 2480, 2520, 3003, 3047, 3576, 3624, 4199, 4251, 4872, 4928, 5595, 5655, 6368, 6432, 7191, 7259, 8064, 8136, 8987, 9063, 9960, 10040, 10983, 11067, 12056, 12144
Offset: 1

Views

Author

Bruno Berselli, Nov 19 2012

Keywords

Comments

Equivalently, numbers of the form m*(25*m+2), where m = 0,-1,1,-2,2,-3,3,...
Also, integer values of h*(h+2)/25.
Exponents in the expansion of Product_{n >= 1} (1 - q^(50*n))*(1 - q^(50*n-23))*(1 - q^(50*n-27)) = 1 - q^23 - q^27 + q^96 + q^104 - q^219 - q^231 + + - - .... - Peter Bala, Dec 18 2024

Crossrefs

Cf. similar sequences listed in A219257.

Programs

  • Magma
    [n: n in [0..13000] | IsSquare(25*n+1)];
    
  • Magma
    I:=[0,23,27,96,104]; [n le 5 select I[n] else Self(n-1)+2*Self(n-2)-2*Self(n-3)-Self(n-4)+Self(n-5): n in [1..50]]; // Vincenzo Librandi, Aug 18 2013
  • Maple
    A219259:=proc(q)
    local n;
    for n from 1 to q do if type(sqrt(25*n+1), integer) then print(n);
    fi; od; end:
    A219259(1000); # Paolo P. Lava, Feb 19 2013
  • Mathematica
    Select[Range[0, 13000], IntegerQ[Sqrt[25 # + 1]] &]
    CoefficientList[Series[x (23 + 4 x + 23 x^2)/((1 + x)^2 (1 - x)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 18 2013 *)

Formula

G.f.: x^2*(23 + 4*x + 23*x^2)/((1 + x)^2*(1 - x)^3).
a(n) = a(-n+1) = (50*n*(n-1) + 21*(-1)^n*(2*n - 1) + 5)/8 + 2.
25*a(n)+1 = A047209(A197652(n+1))^2.
Sum_{n>=2} 1/a(n) = 25/4 - cot(2*Pi/25)*Pi/2. - Amiram Eldar, Mar 17 2022

A262389 Numbers whose last digit is composite.

Original entry on oeis.org

4, 6, 8, 9, 14, 16, 18, 19, 24, 26, 28, 29, 34, 36, 38, 39, 44, 46, 48, 49, 54, 56, 58, 59, 64, 66, 68, 69, 74, 76, 78, 79, 84, 86, 88, 89, 94, 96, 98, 99, 104, 106, 108, 109, 114, 116, 118, 119, 124, 126, 128, 129, 134, 136, 138, 139, 144, 146, 148, 149
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 21 2015

Keywords

Comments

Numbers ending in 4, 6, 8 or 9.
Union of A017317, A017341, A017365 and A017377.
Subsequence of A118951 (numbers containing at least one composite digit).
Complement of (A197652 Union A260181).

Crossrefs

Cf. A118951, A197652, A260181 (last digit is prime).

Programs

  • Magma
    [(5*n+1-(-1)^n+(3+(-1)^n)*(-1)^((2*n-3-(-1)^n) div 4) div 2) div 2: n in [1..70]]; // Vincenzo Librandi, Sep 21 2015
  • Maple
    A262389:=n->(5*n+1-(-1)^n+(3+(-1)^n)*(-1)^((2*n-3-(-1)^n)/4)/2)/2: seq(A262389(n), n=1..100);
  • Mathematica
    Table[(5n+1-(-1)^n+(3+(-1)^n)*(-1)^((2n-3-(-1)^n)/4)/2)/2, {n, 100}]
    LinearRecurrence[{1, 0, 0, 1, -1}, {4, 6, 8, 9, 14}, 80] (* Vincenzo Librandi, Sep 21 2015 *)
    CoefficientList[Series[(4 + 2*x + 2*x^2 + x^3 + x^4)/((x - 1)^2*(1 + x + x^2 + x^3)), {x, 0, 80}], x] (* Wesley Ivan Hurt, Sep 21 2015 *)
    Select[Range[200],CompositeQ[Mod[#,10]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 21 2019 *)

Formula

G.f.: x*(4+2*x+2*x^2+x^3+x^4)/((x-1)^2*(1+x+x^2+x^3)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (5*n+1-(-1)^n+(3+(-1)^n)*(-1)^((2*n-3-(-1)^n)/4)/2)/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(10-2*sqrt(5))*Pi - sqrt(5)*arccoth(3/sqrt(5)) - 4*log(2))/20. - Amiram Eldar, Jul 30 2024

Extensions

Name edited by Jon E. Schoenfield, Feb 15 2018

A293292 Numbers with last digit less than 5 (in base 10).

Original entry on oeis.org

0, 1, 2, 3, 4, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 30, 31, 32, 33, 34, 40, 41, 42, 43, 44, 50, 51, 52, 53, 54, 60, 61, 62, 63, 64, 70, 71, 72, 73, 74, 80, 81, 82, 83, 84, 90, 91, 92, 93, 94, 100, 101, 102, 103, 104, 110, 111, 112, 113, 114, 120, 121, 122, 123, 124, 130
Offset: 1

Views

Author

Bruno Berselli, Oct 05 2017

Keywords

Comments

Equivalently, numbers k such that floor(k/5) = 2*floor(k/10).
After 0, partial sums of A010122 starting from the 2nd term.
The sequence differs from A007091 after a(25).
Also numbers k such that floor(k/5) is even. - Peter Luschny, Oct 05 2017

Crossrefs

Cf. A010122, A239229, A257145, A293481 (complement).
Sequences of the type floor(n/d) = (10/d)*floor(n/10), where d is a factor of 10: A008592 (d=1), A197652 (d=2), this sequence (d=5), A001477 (d=10).
Sequences of the type n + r*floor(n/r): A005843 (r=1), A042948 (r=2), A047240 (r=3), A047476 (r=4), this sequence (r=5).

Programs

  • Magma
    [n: n in [0..130] | n mod 10 lt 5];
    
  • Magma
    [n: n in [0..130] | IsEven(Floor(n/5))];
    
  • Magma
    [n+5*Floor(n/5): n in [0..70]];
    
  • Maple
    select(k -> type(floor(k/5), even), [$0..130]); # Peter Luschny, Oct 05 2017
  • Mathematica
    Table[n + 5 Floor[n/5], {n, 0, 70}]
    Reap[For[k = 0, k <= 130, k++, If[Floor[k/5] == 2*Floor[k/10], Sow[k]]]][[2, 1]] (* or *) LinearRecurrence[{1, 0, 0, 0, 1, -1}, {0, 1, 2, 3, 4, 10}, 66] (* Jean-François Alcover, Oct 05 2017 *)
  • PARI
    concat(0, Vec(x^2*(1 + x + x^2 + x^3 + 6*x^4) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)) + O(x^70))) \\ Colin Barker, Oct 05 2017
    
  • PARI
    select(k->floor(k/5) == 2*floor(k/10), vector(1000, k, k)) \\ Colin Barker, Oct 05 2017
    
  • Python
    [k for k in range(131) if (k//5) % 2 == 0] # Peter Luschny, Oct 05 2017
    
  • Python
    def A293292(n): return (n-1<<1)-(n-1)%5 # Chai Wah Wu, Oct 29 2024
    
  • Sage
    [k for k in (0..130) if 2.divides(floor(k/5))] # Peter Luschny, Oct 05 2017

Formula

G.f.: x^2*(1 + x + x^2 + x^3 + 6*x^4)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4)).
a(n) = a(n-1) + a(n-5) - a(n-6).
a(n) = (n-1) + 5*floor((n-1)/5) = 10*floor((n-1)/5) + ((n-1) mod 5).
a(n) = A257145(n+2) - A239229(n-1). - R. J. Mathar, Oct 05 2017
a(n) = 2n-2-((n-1) mod 5). - Chai Wah Wu, Oct 29 2024

Extensions

Definition by David A. Corneth, Oct 05 2017

A266297 Numbers whose last digit is a square.

Original entry on oeis.org

0, 1, 4, 9, 10, 11, 14, 19, 20, 21, 24, 29, 30, 31, 34, 39, 40, 41, 44, 49, 50, 51, 54, 59, 60, 61, 64, 69, 70, 71, 74, 79, 80, 81, 84, 89, 90, 91, 94, 99, 100, 101, 104, 109, 110, 111, 114, 119, 120, 121, 124, 129, 130, 131, 134, 139, 140, 141, 144, 149
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 26 2015

Keywords

Comments

Numbers ending in 0, 1, 4 and 9.
Union of A008592, A017281, A017317 and A017377. - Hurt
None of these numbers are prime in Z[phi] (where phi = 1/2 + sqrt(5)/2 is the golden ratio), since the numbers in this sequence that are prime in Z can be expressed in the form (a - b sqrt(5))(a + b sqrt(5)). - Alonso del Arte, Dec 30 2015
Union of A197652 and A016897. - Wesley Ivan Hurt, Dec 31 2015
Union of A146763 and A090771. - Wesley Ivan Hurt, Jan 01 2016

Crossrefs

Programs

  • Magma
    [(10*n-11+(-1)^n+(4+2*(-1)^n)*(-1)^((2*n-1+(-1)^n) div 4))/4: n in [1..60]]; // Vincenzo Librandi, Dec 27 2015
    
  • Maple
    A266297:=n->(10*n-11+(-1)^n+(4+2*(-1)^n)*(-1)^((2*n-1+(-1)^n)/4))/4: seq(A266297(n), n=1..100);
  • Mathematica
    Table[(10 n - 11 + (-1)^n + (4 + 2 (-1)^n)*(-1)^((2 n - 1 + (-1)^n)/4))/4, {n, 50}] (* G. C. Greubel, Dec 27 2015 *)
    LinearRecurrence[{1, 0, 0, 1, -1}, {0, 1, 4, 9, 10}, 60] (* Vincenzo Librandi, Dec 27 2015 *)
    CoefficientList[Series[x*(1 + 3*x + 5*x^2 + x^3)/((x - 1)^2*(1 + x + x^2 + x^3)), {x, 0, 100}], x] (* Wesley Ivan Hurt, Dec 30 2015 *)
    Flatten[Table[10n + {0, 1, 4, 9}, {n, 0, 19}]] (* Alonso del Arte, Dec 30 2015 *)
    Select[Range[0,150],MemberQ[{0,1,4,9},Mod[#,10]]&] (* Harvey P. Dale, Jul 30 2019 *)
  • PARI
    is(n) = issquare(n%10); \\ Altug Alkan, Dec 29 2015

Formula

G.f.: x^2*(1 + 3*x + 5*x^2 + x^3)/((x - 1)^2*(1 + x + x^2 + x^3)).
a(n) = a(n - 1) + (n - 4) - a(n - 5) for n > 5.
a(n) = (10n - 11 + (-1)^n + (4 + 2(-1)^n) * (-1)^((2n - 1 + (-1)^n)/4))/4.
a(n+1) - a(n) = A091084(n+1) for n>0.
Sum_{n>=2} (-1)^n/a(n) = (14*sqrt(5)*arccoth(sqrt(5)) - 2*Pi*sqrt(1-2/sqrt(5)) + 16*log(2) + 5*log(5))/40. - Amiram Eldar, Jul 30 2024
Showing 1-5 of 5 results.