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-10 of 11 results. Next

A339774 a(n) is the least k such that 3^k == A047471(n) (mod 2^A047471(n)).

Original entry on oeis.org

0, 1, 2, 39, 23988, 2685, 1079830, 3, 1798749736, 7936950713, 314244766442, 895397198495, 65283613526364, 203550894972341, 27025091041430142, 54487836217255419, 2756442714229679952, 34856858877609547377, 2262552012902592868562, 4616799241038411627031, 4, 116433218705414728492013
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Dec 16 2020

Keywords

Comments

For n >= 3, 3^x == y (mod 2^n) has solutions x if and only if y is in A047471.

Examples

			a(4) = 39 because A047471(4) = 11 and 3^39 == 11 (mod 2^11).
		

Crossrefs

Cf. A047471.

Programs

  • Maple
    f:= proc(n) local k,v;
      v:= subs(msolve(3^k=n,2^n),k);
      subs(op(indets(v))=0,v)
    end proc:
    seq(seq(f(8*i+j),j=[1,3]),i=0..10);

Formula

a((3^k - (-1)^k)/4 + 1) = k.

A033200 Primes congruent to {1, 3} (mod 8); or, odd primes of form x^2 + 2*y^2.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Comments

Rational primes that decompose in the field Q(sqrt(-2)). - N. J. A. Sloane, Dec 25 2017
Fermat knew of the relationship between a prime being congruent to 1 or 3 mod 8 and its being the sum of a square and twice a square, and claimed to have a firm proof of this fact. These numbers are not primes in Z[sqrt(-2)], as they have x - y sqrt(-2) as a divisor. - Alonso del Arte, Dec 07 2012
Terms m in A047471 with A010051(m) = 1. - Reinhard Zumkeller, Dec 29 2012
This sequence gives the primes p which satisfy norm(rho(p)) = + 1 with rho(p) := 2*cos(Pi/p) (the length ratio (smallest diagonal)/side in the regular p-gon). The norm of an algebraic number (over Q) is the product over all zeros of its minimal polynomial. Here norm(rho(p)) = (-1)^delta(p)* C(p, 0), with the degree delta(p) = A055034(p) = (p-1)/2. For the minimal polynomial C see A187360. For p == 1 (mod 8) the norm is C(p, 0) (see a comment on 4*A005123) and for p == 3 (mod 8) the norm is -C(p, 0) (see a comment on A186297). For the primes with norm(rho(p)) = -1 see A003628. - Wolfdieter Lang, Oct 24 2013
If p is a member then it has a unique representation as x^2+2y^2 [Frei, Theorem 3]. - N. J. A. Sloane, May 30 2014
Primes that are the quarter perimeter of a Heronian triangle. Such primes are unique to the Heronian triangle (see Yiu link). - Frank M Jackson, Nov 30 2014

Examples

			Since 11 is prime and 11 == 3 (mod 8), 11 is in the sequence. (Also 11 = 3^2 + 2 * 1^2 = (3 + sqrt(-2))(3 - sqrt(-2)).)
Since 17 is prime and 17 == 1 (mod 8), 17 is in the sequence.
		

References

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

Crossrefs

Cf. A033203.

Programs

  • Haskell
    a033200 n = a033200_list !! (n-1)
    a033200_list = filter ((== 1) . a010051) a047471_list
    -- Reinhard Zumkeller, Dec 29 2012
    
  • Magma
    [p: p in PrimesUpTo(600) | p mod 8 in [1, 3]]; // Vincenzo Librandi, Aug 04 2012
    
  • Mathematica
    Rest[QuadPrimes2[1, 0, 2, 10000]] (* see A106856 *)
    Select[Prime[Range[200]],MemberQ[{1,3},Mod[#,8]]&] (* Harvey P. Dale, Jun 09 2017 *)
  • PARI
    is(n)=n%8<4 && n%2 && isprime(n) \\ Charles R Greathouse IV, Feb 09 2017

Formula

a(n) = A033203(n+1). - Zak Seidov, May 29 2014
A007519 UNION A007520. - R. J. Mathar, Jun 09 2020
L(-2, a(n)) = +1, n >= 1, with the Legendre symbol L. -Wolfdieter Lang, Jul 24 2024

A047404 Numbers that are congruent to {1, 2, 3, 6} mod 8.

Original entry on oeis.org

1, 2, 3, 6, 9, 10, 11, 14, 17, 18, 19, 22, 25, 26, 27, 30, 33, 34, 35, 38, 41, 42, 43, 46, 49, 50, 51, 54, 57, 58, 59, 62, 65, 66, 67, 70, 73, 74, 75, 78, 81, 82, 83, 86, 89, 90, 91, 94, 97, 98, 99, 102, 105, 106, 107, 110, 113, 114, 115, 118, 121, 122, 123
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n) = A056594(n) + 2*n-2. - Zerinvary Lajos, Jul 06 2008
G.f.: x*(1+x)*(2*x^2-x+1)/((x^2+1)*(x-1)^2). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, May 30 2016: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
a(n) = (4*n-4+i^(1-n)-i^(1+n))/2 where i = sqrt(-1).
a(2k) = A016825(k-1) k>0, a(2k-1) = A047471(k). (End)
E.g.f.: 2 + sin(x) + 2*(x - 1)*exp(x). - Ilya Gutkovskiy, May 30 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2)*Pi/8 + log(2)/4. - Amiram Eldar, Dec 23 2021

A047476 Numbers that are congruent to {0, 1, 2, 3} mod 8.

Original entry on oeis.org

0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 32, 33, 34, 35, 40, 41, 42, 43, 48, 49, 50, 51, 56, 57, 58, 59, 64, 65, 66, 67, 72, 73, 74, 75, 80, 81, 82, 83, 88, 89, 90, 91, 96, 97, 98, 99, 104, 105, 106, 107, 112, 113, 114, 115, 120, 121, 122
Offset: 1

Views

Author

Keywords

Comments

Primes of this sequence are in A033203. All of these numbers satisfy the condition that n XOR 4 = n + 4. - Brad Clardy, Jul 24 2012
Numbers k such that floor(k/4) = 2*floor(k/8). - Bruno Berselli, Oct 05 2017

Crossrefs

Cf. A033203 (primes), A047467, A047471.

Programs

  • Haskell
    a047476 n = a047476_list !! (n-1)
    a047476_list = [n | n <- [1..], mod n 8 <= 3]
    -- Reinhard Zumkeller, Dec 29 2012
    
  • Magma
    I:=[0, 1, 2, 3, 8]; [n le 5 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..70]]; // Vincenzo Librandi, May 16 2012
    
  • Maple
    A047476:=n->(-7-(-1)^n-(1-I)*(-I)^n-(1+I)*I^n+4*n)/2: seq(A047476(n), n=1..100); # Wesley Ivan Hurt, Jun 01 2016
  • Mathematica
    Select[Range[0,300], MemberQ[{0,1,2,3}, Mod[#,8]]&] (* Vincenzo Librandi, May 16 2012 *)
    LinearRecurrence[{1,0,0,1,-1},{0,1,2,3,8},100] (* G. C. Greubel, Jun 01 2016 *)
  • PARI
    x='x+O('x^100); concat(0, Vec(x^2*(1+x+x^2+5*x^3)/((1-x)^2*(1+x)*(1+x^2)))) \\ Altug Alkan, Dec 24 2015

Formula

a(n) = 8 * floor(n/4) + (n mod 4), with offset 0.. a(0)=0. - Gary Detlefs, Mar 09 2010
From Colin Barker, May 14 2012: (Start)
a(n) = (-7 - (-1)^n - (1-i)*(-i)^n - (1+i)*i^n + 4*n)/2, where i=sqrt(-1).
G.f.: x^2*(1 + x + x^2 + 5*x^3)/((1 - x)^2*(1 + x)*(1 + x^2)). (End)
a(n) = a(n-1) + a(n-4) - a(n-5). - Vincenzo Librandi, May 16 2012
a(2*k) = A047471, a(2*k-1) = A047467(k). - Wesley Ivan Hurt, Jun 01 2016
E.g.f.: 5 + sin(x) - cos(x) + (2*x - 3)*sinh(x) + 2*(x - 2)*cosh(x). - Ilya Gutkovskiy, Jun 01 2016
Sum_{n>=2} (-1)^n/a(n) = (2*sqrt(2)-1)*Pi/16 + 5*log(2)/8. - Amiram Eldar, Dec 19 2021

A153860 Triangle by columns: leftmost column = (1, 0, 1, -1, 1, -1, 1, ...); columns >1 = (1, 1, 0, 0, 0, ...).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, -1, 0, 1, 1, 1, 0, 0, 1, 1, -1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1
Offset: 1

Views

Author

Gary W. Adamson, Jan 03 2009

Keywords

Comments

As an infinite lower triangular matrix M; M * [1,2,3,...] = A063210: (1, 2, 6, 6, 10, 10, 14, 14, ...).
M * [1, 3, 5, 7, ...] = A047471, {1,3} mod 8.
Eigensequence of the triangle = A066983 starting (1, 1, 3, 3, 7, 9, 17, 25, ...).
Binomial transform of the triangle = A153861.
Row sums = A153284: (1, 1, 3, 1, 3, 1, 3, 1, ...).

Examples

			First few rows of the triangle:
   1;
   0, 1;
   1, 1, 1;
  -1, 0, 1, 1;
   1, 0, 0, 1, 1;
  -1, 0, 0, 0, 1, 1;
   1, 0, 0, 0, 0, 1, 1;
  -1, 0, 0, 0, 0, 0, 1, 1;
   1, 0, 0, 0, 0, 0, 0, 1, 1;
  ...
		

Crossrefs

Cf. A153861 (binomial transform), A153284 (row sums), A063210, A047471, A066983.

Programs

  • Haskell
    a153860 n k = a153860_tabl !! (n-1) !! (k-1)
    a153860_row n = a153860_tabl !! (n-1)
    a153860_tabl = [1] : [0, 1] : iterate (\(x:xs) -> -x : 0 : xs) [1, 1, 1]
    -- Reinhard Zumkeller, Dec 16 2013

Formula

Triangle by columns: leftmost column = (1, 0, 1, -1, 1, ...); columns > 1 = (1, 1, 0, 0, 0, ...).

A255840 a(n) = (4*n^2 - 4*n + 1 - (-1)^n)/2.

Original entry on oeis.org

0, 1, 4, 13, 24, 41, 60, 85, 112, 145, 180, 221, 264, 313, 364, 421, 480, 545, 612, 685, 760, 841, 924, 1013, 1104, 1201, 1300, 1405, 1512, 1625, 1740, 1861, 1984, 2113, 2244, 2381, 2520, 2665, 2812, 2965, 3120, 3281, 3444, 3613, 3784, 3961, 4140, 4325, 4512
Offset: 0

Views

Author

Wesley Ivan Hurt, Mar 07 2015

Keywords

Comments

Take an n X n square grid and add unit squares along each side except for the corners --> do this repeatedly along each side with the same restriction until no squares can be added. a(n) is the total area of each figure. The perimeter, P, of each figure is given by P(n) = 4*A042963(n), n>0 (see example).
For n>0, partial sums of a(n) are in A056640.

Examples

			                                                                 _
                                                               _|_|_
                            _              _ _               _|_|_|_|_
                          _|_|_          _|_|_|_           _|_|_|_|_|_|_
              _ _       _|_|_|_|_      _|_|_|_|_|_       _|_|_|_|_|_|_|_|_
    _        |_|_|     |_|_|_|_|_|    |_|_|_|_|_|_|     |_|_|_|_|_|_|_|_|_|
   |_|       |_|_|       |_|_|_|      |_|_|_|_|_|_|       |_|_|_|_|_|_|_|
                           |_|          |_|_|_|_|           |_|_|_|_|_|
                                          |_|_|               |_|_|_|
                                                                |_|
   n=1        n=2          n=3             n=4                  n=5
		

Crossrefs

Cf. A000290 (squares), A002620 (quarter-squares), A042963.

Programs

  • Magma
    [(4*n^2 - 4*n + 1 - (-1)^n)/2 : n in [0..100]];
    
  • Maple
    A255840:=n->(4*n^2 - 4*n + 1 - (-1)^n)/2: seq(A255840(n), n=0..100);
  • Mathematica
    CoefficientList[Series[x (1 + 2 x + 5 x^2)/((1 + x) (1 - x)^3), {x, 0, 50}], x]
  • PARI
    vector(100,n,(4*(n-1)^2 - 4*(n-1) + 1 + (-1)^n)/2) \\ Derek Orr, Mar 09 2015

Formula

G.f.: x*(1+2*x+5*x^2)/((1+x)*(1-x)^3).
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
a(n) = A000290(n) + 4*A002620(n).
a(n) - a(n-1) = A047471(n). - Wesley Ivan Hurt, Apr 28 2017

A047454 Numbers that are congruent to {1, 2, 3, 4} mod 8.

Original entry on oeis.org

1, 2, 3, 4, 9, 10, 11, 12, 17, 18, 19, 20, 25, 26, 27, 28, 33, 34, 35, 36, 41, 42, 43, 44, 49, 50, 51, 52, 57, 58, 59, 60, 65, 66, 67, 68, 73, 74, 75, 76, 81, 82, 83, 84, 89, 90, 91, 92, 97, 98, 99, 100, 105, 106, 107, 108, 113, 114, 115, 116, 121, 122, 123
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[1, 2, 3, 4, 9]; [n le 5 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..70]]; // Vincenzo Librandi, May 15 2012
    
  • Maple
    A047454:=n->(-5-I^(2*n)-(1-I)*(-I)^n-(1+I)*I^n+4*n)/2: seq(A047454(n), n=1..100); # Wesley Ivan Hurt, Jun 01 2016
  • Mathematica
    Select[Range[0,300], MemberQ[{1,2,3,4}, Mod[#,8]]&] (* Vincenzo Librandi, May 15 2012 *)
  • PARI
    my(x='x+O('x^100)); Vec(x*(1+x+x^2+x^3+4*x^4)/((1-x)^2*(1+x)*(1+x^2))) \\ Altug Alkan, Dec 24 2015

Formula

From Colin Barker, May 14 2012: (Start)
a(n) = (-5-(-1)^n-(1-i)*(-i)^n-(1+i)*i^n+4*n)/2 where i=sqrt(-1).
G.f.: x*(1+x+x^2+x^3+4*x^4)/((1-x)^2*(1+x)*(1+x^2)). (End)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. - Vincenzo Librandi, May 15 2012
a(2k) = A047463(k), a(2k-1) = A047471(k). - Wesley Ivan Hurt, Jun 01 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = (2*sqrt(2)-1)*Pi/16 + 3*log(2)/8. - Amiram Eldar, Dec 23 2021

A047533 Numbers that are congruent to {1, 2, 3, 7} mod 8.

Original entry on oeis.org

1, 2, 3, 7, 9, 10, 11, 15, 17, 18, 19, 23, 25, 26, 27, 31, 33, 34, 35, 39, 41, 42, 43, 47, 49, 50, 51, 55, 57, 58, 59, 63, 65, 66, 67, 71, 73, 74, 75, 79, 81, 82, 83, 87, 89, 90, 91, 95, 97, 98, 99, 103, 105, 106, 107, 111, 113, 114, 115, 119, 121, 122, 123
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [1, 2, 3, 7]]; // Wesley Ivan Hurt, May 29 2016
  • Maple
    A047533:=n->(8*n-7+I^(2*n)+(1+2*I)*I^(-n)+(1-2*I)*I^n)/4: seq(A047533(n), n=1..100); # Wesley Ivan Hurt, May 29 2016
  • Mathematica
    Table[(8n-7+I^(2n)+(1+2*I)*I^(-n)+(1-2*I)*I^n)/4, {n, 80}] (* Wesley Ivan Hurt, May 29 2016 *)
    LinearRecurrence[{1, 0, 0, 1, -1}, {1, 2, 3, 7, 9}, 50] (* G. C. Greubel, May 29 2016 *)

Formula

From Wesley Ivan Hurt, May 29 2016: (Start)
G.f.: x*(1+x+x^2+4*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) = (8*n-7+i^(2*n)+(1+2*i)*i^(-n)+(1-2*i)*i^n)/4 where i=sqrt(-1).
a(2k) = A047524(k), a(2k-1) = A047471(k). (End)
E.g.f.: (2 + 2*sin(x) + cos(x) + 4*(x - 1)*sinh(x) + (4*x - 3)*cosh(x))/2. - Ilya Gutkovskiy, May 29 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*sqrt(2)*Pi/16 + log(2)/8 + sqrt(2)*log(3-2*sqrt(2))/16. - Amiram Eldar, Dec 23 2021

A047606 Numbers that are congruent to {1, 2, 3, 5} mod 8.

Original entry on oeis.org

1, 2, 3, 5, 9, 10, 11, 13, 17, 18, 19, 21, 25, 26, 27, 29, 33, 34, 35, 37, 41, 42, 43, 45, 49, 50, 51, 53, 57, 58, 59, 61, 65, 66, 67, 69, 73, 74, 75, 77, 81, 82, 83, 85, 89, 90, 91, 93, 97, 98, 99, 101, 105, 106, 107, 109, 113, 114, 115, 117, 121, 122, 123
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..120] | n mod 8 in [1,2,3,5]];
    
  • Maple
    A047606:=n->2*n-3+(3-I^(2*n))*(1-I^(n*(n+1)))/4: seq(A047606(n), n=1..100); # Wesley Ivan Hurt, Jun 02 2016
  • Mathematica
    Select[Range[120], MemberQ[{1, 2, 3, 5}, Mod[#, 8]] &] (* or *) LinearRecurrence[{1, 0, 0, 1, -1}, {1, 2, 3, 5, 9}, 60] (* Bruno Berselli, Jul 17 2012 *)
  • Maxima
    makelist(2*n-3+(3-(-1)^n)*(1-%i^(n*(n+1)))/4,n,1,60);
    
  • PARI
    Vec((1+x+x^2+2*x^3+3*x^4)/((1+x)*(1-x)^2*(1+x^2))+O(x^60)) (End)

Formula

From Bruno Berselli, Jul 17 2012: (Start)
G.f.: x*(1+x+x^2+2*x^3+3*x^4)/((1+x)*(1-x)^2*(1+x^2)).
a(n) = 2*n-3+(3-(-1)^n)*(1-i^(n*(n+1)))/4, where i=sqrt(-1). (End)
From Wesley Ivan Hurt, Jun 02 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(2k) = A047617(k), a(2k-1) = A047471(k). (End)
E.g.f.: (6 + 2*sin(x) - cos(x) + 4*(x - 1)*sinh(x) + (4*x - 5)*cosh(x))/2. - Ilya Gutkovskiy, Jun 03 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = (3*sqrt(2)-2)*Pi/16 + (2-sqrt(2))*log(2)/16 + sqrt(2)*log(2+sqrt(2))/8. - Amiram Eldar, Dec 23 2021

A047473 Numbers that are congruent to {2, 3} mod 8.

Original entry on oeis.org

2, 3, 10, 11, 18, 19, 26, 27, 34, 35, 42, 43, 50, 51, 58, 59, 66, 67, 74, 75, 82, 83, 90, 91, 98, 99, 106, 107, 114, 115, 122, 123, 130, 131, 138, 139, 146, 147, 154, 155, 162, 163, 170, 171, 178, 179, 186, 187, 194, 195, 202, 203, 210, 211, 218, 219, 226, 227, 234
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that k and k+2 have the same digital binary sum. - Benoit Cloitre, Dec 01 2002
Also, numbers k such that k*(3*k + 1)/8 + 1/4 is a nonnegative integer. - Bruno Berselli, Feb 14 2017

Crossrefs

Programs

  • Mathematica
    Flatten[# + {2,3} &/@ (8 Range[0, 30])] (* or *) LinearRecurrence[{1, 1, -1}, {2, 3, 10}, 60] (* Harvey P. Dale, Sep 28 2012 *)

Formula

a(n) = 8*n - a(n-1) - 11 for n>1, a(1)=2. - Vincenzo Librandi, Aug 06 2010
From R. J. Mathar, Oct 08 2011: (Start)
a(n) = 4*n - 7/2 - 3*(-1)^n/2.
G.f.: x*(2 + x + 5*x^2)/((1 + x)*(1 - x)^2). (End)
a(1)=2, a(2)=3, a(3)=10; for n>3, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Sep 28 2012
Sum_{n>=1} (-1)^(n+1)/a(n) = (2-sqrt(2))*Pi/16 + sqrt(2)*log(sqrt(2)+1)/8 - log(2)/8. - Amiram Eldar, Dec 18 2021

Extensions

More terms from Vincenzo Librandi, Aug 06 2010
Showing 1-10 of 11 results. Next