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-4 of 4 results.

A033203 Primes p congruent to {1, 2, 3} (mod 8); or primes p of form x^2 + 2*y^2; or primes p such that x^2 = -2 has a solution mod p.

Original entry on oeis.org

2, 3, 11, 17, 19, 41, 43, 59, 67, 73, 83, 89, 97, 107, 113, 131, 137, 139, 163, 179, 193, 211, 227, 233, 241, 251, 257, 281, 283, 307, 313, 331, 337, 347, 353, 379, 401, 409, 419, 433, 443, 449, 457, 467, 491, 499, 521, 523, 547, 563, 569, 571, 577, 587, 593, 601, 617, 619, 641, 643, 659, 673, 683
Offset: 1

Views

Author

Keywords

Comments

Sequence naturally partitions into two sequences: all primes p with ord_p(-2) odd (A163183, the primes dividing 2^j +1 for some odd j) and certain primes p with ord_p(-2) even (A163185). - Christopher J. Smyth, Jul 23 2009
Terms m in A047476 with A010051(m) = 1. - Reinhard Zumkeller, Dec 29 2012

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.

Crossrefs

Cf. A039706, A003628 (complement with respect to A000040).
Primes in A002479.
Cf. A051100 (see Mathar's comment).
Apart from leading term the same as A033200.

Programs

  • Haskell
    a033203 n = a033203_list !! (n-1)
    a033203_list = filter ((== 1) . a010051) a047476_list
    -- Reinhard Zumkeller, Dec 29 2012, Jan 22 2012
    
  • Magma
    [p: p in PrimesUpTo(600) | p mod 8 in [1..3]]; // Vincenzo Librandi, Aug 11 2012
    
  • Magma
    [p: p in PrimesUpTo(800) | NormEquation(2,p) eq true]; // Bruno Berselli, Jul 03 2016
    
  • Mathematica
    QuadPrimes2[1, 0, 2, 10000] (* see A106856 *)
    Select[Prime[Range[200]],MemberQ[{1,2,3},Mod[#,8]]&] (* Harvey P. Dale, Mar 16 2013 *)
  • PARI
    is(n)=isprime(n) && issquare(Mod(-2,n)) \\ Charles R Greathouse IV, Nov 29 2016

Formula

a(n) = A002332(n) + 2*A002333(n)^2. - Zak Seidov, May 29 2014

A103127 Numbers congruent to {-1, 1, 3, 5} mod 16.

Original entry on oeis.org

1, 3, 5, 15, 17, 19, 21, 31, 33, 35, 37, 47, 49, 51, 53, 63, 65, 67, 69, 79, 81, 83, 85, 95, 97, 99, 101, 111, 113, 115, 117, 127, 129, 131, 133, 143, 145, 147, 149, 159, 161, 163, 165, 175, 177, 179, 181, 191, 193, 195, 197, 207, 209, 211, 213, 223, 225, 227, 229, 239, 241
Offset: 1

Views

Author

N. J. A. Sloane, Mar 25 2005

Keywords

Comments

Agrees with A103192 for the first 511 terms, but then diverges (see comment in A103192). - Bruno Berselli, Dec 01 2016

Crossrefs

Programs

  • Haskell
    a103127 n = a103127_list !! (n-1)
    a103127_list = [x | x <- [1..], x `mod` 16 `elem` [1,3,5,15]]
    -- Reinhard Zumkeller, Jul 21 2012
  • Mathematica
    Select[Range[300],MemberQ[{1,3,5,15},Mod[#,16]]&] (* Harvey P. Dale, Aug 10 2019 *)

Formula

a(n) = 2*A047527(n) + 1.
From R. J. Mathar, Aug 30 2008: (Start)
O.g.f.: x*(1 + 2*x + 2*x^2 + 10*x^3 + x^4)/((1 - x)^2*(1 + x)*(1 + x^2)).
a(n) = a(n-4) + 16. (End)
a(n) = 2*A047476(n+1) - 1. - Philippe Deléham, Dec 01 2016

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

A295653 Square array T(n, k), n >= 0, k >= 0, read by antidiagonals upwards: T(n, k) = the (k+1)-th nonnegative number m such that n AND m = 0 (where AND denotes the bitwise AND operator).

Original entry on oeis.org

0, 0, 1, 0, 2, 2, 0, 1, 4, 3, 0, 4, 4, 6, 4, 0, 1, 8, 5, 8, 5, 0, 2, 2, 12, 8, 10, 6, 0, 1, 8, 3, 16, 9, 12, 7, 0, 8, 8, 10, 8, 20, 12, 14, 8, 0, 1, 16, 9, 16, 9, 24, 13, 16, 9, 0, 2, 2, 24, 16, 18, 10, 28, 16, 18, 10, 0, 1, 4, 3, 32, 17, 24, 11, 32, 17, 20
Offset: 0

Views

Author

Rémy Sigrist, Nov 25 2017

Keywords

Comments

This sequence has similarities with A126572: here we check for common bits in binary representations, there for common primes in prime factorizations.
For any n >= 0 and k >= 0:
- T(0, k) = k,
- T(1, k) = 2*k,
- T(2, k) = A042948(k),
- T(3, k) = 4*k,
- T(4, k) = A047476(k),
- T(5, k) = A047467(k),
- T(2^n - 1, k) = 2^n * k,
- T(n, 0) = 0,
- T(n, 1) = A006519(n+1),
- T(n, k + 2^A080791(n)) = T(n, k) + 2^A029837(n+1) (i.e. each row is linear),
- A000120(T(n, k)) = A000120(k).

Examples

			Square array begins:
n\k  0   1   2   3   4   5   6   7   8   9  ...
0:   0   1   2   3   4   5   6   7   8   9  ...
1:   0   2   4   6   8  10  12  14  16  18  ...
2:   0   1   4   5   8   9  12  13  16  17  ...
3:   0   4   8  12  16  20  24  28  32  36  ...
4:   0   1   2   3   8   9  10  11  16  17  ...
5:   0   2   8  10  16  18  24  26  32  34  ...
6:   0   1   8   9  16  17  24  25  32  33  ...
7:   0   8  16  24  32  40  48  56  64  72  ...
8:   0   1   2   3   4   5   6   7  16  17  ...
9:   0   2   4   6  16  18  20  22  32  34  ...
		

Crossrefs

Programs

  • PARI
    T(n,k) = if (n==0, k, n%2, 2*T(n\2,k), 2*T(n\2,k\2) + (k%2))

Formula

For any n >= 0 and k >= 0:
- T(0, k) = k,
- T(2*n + 1, k) = 2*T(n, k),
- T(2*n, 2*k) = 2*T(n, k),
- T(2*n, 2*k + 1) = 2*T(n, k) + 1.
For any n >= 0, T(n, k) ~ 2^A000120(n) * k as k tends to infinity.
Showing 1-4 of 4 results.