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.

Previous Showing 11-19 of 19 results.

A306220 a(n) is the smallest prime p such that Kronecker(-n,p) = -1.

Original entry on oeis.org

3, 5, 2, 3, 2, 13, 3, 5, 7, 3, 2, 5, 2, 11, 7, 3, 5, 5, 2, 11, 2, 3, 5, 13, 3, 11, 2, 3, 2, 7, 3, 5, 5, 3, 2, 7, 2, 5, 7, 3, 13, 5, 2, 7, 2, 3, 5, 5, 3, 7, 2, 3, 2, 13, 3, 11, 5, 3, 2, 7, 2, 5, 5, 3, 7, 19, 2, 5, 2, 3, 7, 5, 3, 7, 2, 3, 2, 5, 3, 11, 7, 3, 2, 13, 2, 7, 5
Offset: 1

Views

Author

Jianing Song, Jan 29 2019

Keywords

Comments

A companion sequence to A092419.
Conjecture: lim sup log(a(n))/log(n) = 0. For example, it seems that log(a(n))/log(n) < 0.5 for all n > 1364.

Crossrefs

Cf. A092419.
See A306224 for another version.

Programs

  • Maple
    # This requires Maple 2016 or later
    f:= proc(n) local p;
      p:= 2;
      while NumberTheory:-KroneckerSymbol(-n,p) <> -1 do p:= nextprime(p) od:
      p
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 17 2019
  • Mathematica
    a[n_] := For[p = 2, True, p = NextPrime[p], If[KroneckerSymbol[-n, p] == -1, Return[p]]];
    Array[a, 100] (* Jean-François Alcover, Jun 18 2020 *)
  • PARI
    a(n) = forprime(p=2, , if(kronecker(-n, p)<0, return(p)))

Formula

a(n) = 2 if and only if n == 3, 5 (mod 8). See A047621.
a(n) = 3 if and only if n == 1, 4, 7, 10, 16, 22 (mod 24).

A047596 Numbers that are congruent to {2, 3, 4, 5} mod 8.

Original entry on oeis.org

2, 3, 4, 5, 10, 11, 12, 13, 18, 19, 20, 21, 26, 27, 28, 29, 34, 35, 36, 37, 42, 43, 44, 45, 50, 51, 52, 53, 58, 59, 60, 61, 66, 67, 68, 69, 74, 75, 76, 77, 82, 83, 84, 85, 90, 91, 92, 93, 98, 99, 100, 101, 106, 107, 108, 109, 114, 115, 116, 117, 122, 123
Offset: 1

Views

Author

Keywords

Comments

For n > 2, a(n) is the decimal value that results from the conversion of n-1 to binary whose last two bits are altered by either of the following rules: 00->010, 01->011, 10->100, 11->101. For example a(10) = 19 because 10 - 1 = 9 = '10'01'->'10'011' = 19. - Franck Maminirina Ramaharo, Jul 25 2018

Crossrefs

Programs

  • GAP
    Filtered([1..130],n->n mod 8=2 or n mod 8=3 or n mod 8=4 or n mod 8=5); # Muniru A Asiru, Jul 27 2018
  • Magma
    [n: n in [1..120] | n mod 8 in [2..5]]; // Bruno Berselli, Jul 17 2012
    
  • Maple
    A047596:=n->2*n-1-I^(n*(n+1))-(1+I^(2*n))/2: seq(A047596(n), n=1..100); # Wesley Ivan Hurt, Jun 01 2016
  • Mathematica
    Select[Range[120], MemberQ[{2, 3, 4, 5}, Mod[#, 8]] &] (* or *) LinearRecurrence[{1, 0, 0, 1, -1}, {2, 3, 4, 5, 10}, 60] (* Bruno Berselli, Jul 17 2012 *)
  • Maxima
    makelist(2*n-1-%i^(n*(n+1))-(1+(-1)^n)/2,n,1,60); /* Bruno Berselli, Jul 17 2012 */
    
  • PARI
    Vec((2+x+x^2+x^3+3*x^4)/((1+x)*(1-x)^2*(1+x^2))+O(x^60)) \\ Bruno Berselli, Jul 17 2012
    

Formula

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

A047599 Numbers that are congruent to {0, 3, 4, 5} mod 8.

Original entry on oeis.org

0, 3, 4, 5, 8, 11, 12, 13, 16, 19, 20, 21, 24, 27, 28, 29, 32, 35, 36, 37, 40, 43, 44, 45, 48, 51, 52, 53, 56, 59, 60, 61, 64, 67, 68, 69, 72, 75, 76, 77, 80, 83, 84, 85, 88, 91, 92, 93, 96, 99, 100, 101, 104, 107, 108, 109, 112, 115, 116, 117, 120, 123, 124
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

From R. J. Mathar, Oct 08 2011: (Start)
G.f.: ( x^2*(3-2*x+3*x^2) ) / ( (x^2+1)*(x-1)^2 ).
a(n) = 2*n-2-cos(n*Pi/2). (End)
From Wesley Ivan Hurt, May 22 2016: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
a(n) = 2n - 2 - (i^(-n) + i^n)/2 where i = sqrt(-1).
a(2n) = A047621(n), a(2n+1) = A008586(n) for n>0. (End)
Sum_{n>=2} (-1)^n/a(n) = 3*log(2)/4 + sqrt(2)*log(3-2*sqrt(2))/8. - Amiram Eldar, Dec 21 2021

Extensions

More terms from Wesley Ivan Hurt, May 22 2016

A329095 Odd numbers k such that x^2 == 2 (mod k) has no solution.

Original entry on oeis.org

3, 5, 9, 11, 13, 15, 19, 21, 25, 27, 29, 33, 35, 37, 39, 43, 45, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 75, 77, 81, 83, 85, 87, 91, 93, 95, 99, 101, 105, 107, 109, 111, 115, 117, 121, 123, 125, 129, 131, 133, 135, 139, 141, 143, 145, 147, 149, 153, 155, 157, 159, 163
Offset: 1

Views

Author

Jianing Song, Nov 04 2019

Keywords

Comments

Complement of A058529 over the odd numbers: odd numbers k such that x^2 == 2 (mod k) has solutions.
Odd numbers k such that at least one prime factor of k is congruent to 3 or 5 modulo 8 (at least one prime factor is in A003629).
Also odd terms in A025020.

Examples

			x^2 == 2 (mod 45) has no solution, so 45 is a term.
		

Crossrefs

Cf. A003629. A047621 is a subsequence.
Cf. A058529, A057126, A025020 (numbers k such that x^2 == 2 (mod k) has no solution).

Programs

  • Maple
    filter:= proc(t) (numtheory:-factorset(t) mod 8) intersect {3,5} <> {} end proc:
    select(filter, [seq(i,i=1..1000,2)]); # Robert Israel, Nov 05 2019
  • Mathematica
    Reap[Do[If[AnyTrue[FactorInteger[k][[All, 1]], MatchQ[Mod[#, 8], 3|5]&], Sow[k]], {k, 1, 999, 2}]][[2, 1]] (* Jean-François Alcover, Aug 22 2020 *)
  • PARI
    isA329095(k) = (k%2) && !issquare(Mod(2,k))

A047499 Numbers that are congruent to {3, 4, 5, 7} mod 8.

Original entry on oeis.org

3, 4, 5, 7, 11, 12, 13, 15, 19, 20, 21, 23, 27, 28, 29, 31, 35, 36, 37, 39, 43, 44, 45, 47, 51, 52, 53, 55, 59, 60, 61, 63, 67, 68, 69, 71, 75, 76, 77, 79, 83, 84, 85, 87, 91, 92, 93, 95, 99, 100, 101, 103, 107, 108, 109, 111, 115, 116, 117, 119, 123, 124
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [3, 4, 5, 7]]; // Wesley Ivan Hurt, May 27 2016
  • Maple
    A047499:=n->(8*n-1-I^(2*n)-(1-2*I)*I^(-n)-(1+2*I)*I^n)/4: seq(A047499(n), n=1..100); # Wesley Ivan Hurt, May 27 2016
  • Mathematica
    Table[(8n-1-I^(2n)-(1-2*I)*I^(-n)-(1+2*I)*I^n)/4, {n, 80}] (* Wesley Ivan Hurt, May 27 2016 *)
    LinearRecurrence[{1,0,0,1,-1},{3,4,5,7,11},70] (* Harvey P. Dale, May 16 2025 *)

Formula

G.f.: x*(3+x+x^2+2*x^3+x^4) / ( (1+x)*(x^2+1)*(x-1)^2 ). - R. J. Mathar, Nov 06 2015
From Wesley Ivan Hurt, May 27 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (8*n-1-i^(2*n)-(1-2*i)*i^(-n)-(1+2*i)*i^n)/4 where i=sqrt(-1).
a(2k) = A047535(k), a(2k-1) = A047621(k). (End)
E.g.f.: 1 + sin(x) - cos(x)/2 + 2*x*sinh(x) + (2*x - 1/2)*cosh(x). - Ilya Gutkovskiy, May 27 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)+1)*Pi/16 + (4-3*sqrt(2))*log(2)/16 + 3*sqrt(2)*log(2-sqrt(2))/8. - Amiram Eldar, Dec 26 2021

A047600 Numbers that are congruent to {1, 3, 4, 5} mod 8.

Original entry on oeis.org

1, 3, 4, 5, 9, 11, 12, 13, 17, 19, 20, 21, 25, 27, 28, 29, 33, 35, 36, 37, 41, 43, 44, 45, 49, 51, 52, 53, 57, 59, 60, 61, 65, 67, 68, 69, 73, 75, 76, 77, 81, 83, 84, 85, 89, 91, 92, 93, 97, 99, 100, 101, 105, 107, 108, 109, 113, 115, 116, 117, 121, 123, 124
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..120] | n mod 8 in [1,3,4,5]];
    
  • Maple
    A047600:=n->2*n-1-(3+I^(2*n))*(1+I^(n*(n+1)))/4: seq(A047600(n), n=1..100); # Wesley Ivan Hurt, Jun 02 2016
  • Mathematica
    Select[Range[120], MemberQ[{1,3,4,5}, Mod[#,8]]&]  (* Harvey P. Dale, Mar 09 2011 *)
    LinearRecurrence[{1, 0, 0, 1, -1}, {1, 3, 4, 5, 9}, 60] (* Bruno Berselli, Jul 17 2012 *)
  • Maxima
    makelist(2*n-1-(3+(-1)^n)*(1+%i^(n*(n+1)))/4,n,1,60);
    
  • PARI
    Vec((1+2*x+x^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+2*x+x^2+x^3+3*x^4)/((1+x)*(1-x)^2*(1+x^2)).
a(n) = 2*n-1 -(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) = A047621(k), a(2k-1) = A047461(k). (End)
E.g.f.: (6 + sin(x) - 2*cos(x) + (4*x - 3)*sinh(x) + 4*(x - 1)*cosh(x))/2. - Ilya Gutkovskiy, Jun 03 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)+1)*Pi/16 - (4+3*sqrt(2))*log(2)/16 + 3*sqrt(2)*log(sqrt(2)+2)/8. - Amiram Eldar, Dec 24 2021

A091474 Decimal expansion of Pi^2 * (2-sqrt(2))/32.

Original entry on oeis.org

1, 8, 0, 6, 7, 1, 2, 6, 2, 5, 9, 0, 6, 5, 4, 9, 4, 2, 7, 9, 2, 3, 0, 8, 1, 2, 8, 9, 8, 1, 6, 7, 1, 6, 1, 5, 3, 3, 7, 1, 1, 4, 5, 7, 1, 0, 1, 8, 2, 9, 6, 7, 6, 6, 2, 6, 6, 2, 4, 0, 7, 9, 4, 2, 9, 3, 7, 5, 8, 5, 6, 6, 2, 2, 4, 1, 3, 3, 0, 0, 1, 7, 7, 0, 8, 9, 8, 2, 5, 4, 1, 5, 0, 4, 8, 3, 7, 9, 9, 7, 0, 7
Offset: 0

Views

Author

Eric W. Weisstein, Jan 13 2004

Keywords

Examples

			0.18067126259065494279230812898167161533711457101829...
		

Crossrefs

Cf. A047621.

Programs

  • Magma
    SetDefaultRealField(RealField(100)); R:= RealField(); Pi(R)^2*(2-Sqrt(2))/32; // G. C. Greubel, Oct 01 2018
  • Mathematica
    RealDigits[Pi^2 (2-Sqrt[2])/32,10,120][[1]] (* Harvey P. Dale, Nov 18 2013 *)
  • PARI
    default(realprecision, 100); Pi^2*(2-sqrt(2))/32 \\ G. C. Greubel, Oct 01 2018
    

Formula

Equals Integral_{t=0..1} t^2 * log(t)/((t^2 - 1)*(t^4 + 1)) dt.
Equals Sum_{k>=1} 1/A047621(k)^2. - Amiram Eldar, Apr 17 2022

A317613 Permutation of the nonnegative integers: lodumo_4 of A047247.

Original entry on oeis.org

2, 3, 0, 1, 4, 5, 6, 7, 10, 11, 8, 9, 12, 13, 14, 15, 18, 19, 16, 17, 20, 21, 22, 23, 26, 27, 24, 25, 28, 29, 30, 31, 34, 35, 32, 33, 36, 37, 38, 39, 42, 43, 40, 41, 44, 45, 46, 47, 50, 51, 48, 49, 52, 53, 54, 55, 58, 59, 56, 57, 60, 61, 62, 63, 66, 67, 64
Offset: 0

Views

Author

Keywords

Comments

Write n in base 8, then apply the following substitution to the rightmost digit: '0'->'2, '1'->'3', and vice versa. Convert back to decimal.
A self-inverse permutation: a(a(n)) = n.
Array whose columns are, in this order, A047463, A047621, A047451 and A047522, read by rows.

Examples

			a(25) = a('3'1') = '3'3' = 27.
a(26) = a('3'2') = '3'0' = 24.
a(27) = a('3'3') = '3'1' = 25.
a(28) = a('3'4') = '3'4' = 28.
a(29) = a('3'5') = '3'5' = 29.
The sequence as array read by rows:
  A047463, A047621, A047451, A047522;
        2,       3,       0,       1;
        4,       5,       6,       7;
       10,      11,       8,       9;
       12,      13,      14,      15;
       18,      19,      16,      17;
       20,      21,      22,      23;
       26,      27,      24,      25;
       28,      29,      30,      31;
  ...
		

Crossrefs

Programs

  • Magma
    m:=100; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((x^7+x^5+3*x^3-2*x^2-x+2)/((1-x)^2*(x^6+x^4+ x^2+1)))); // G. C. Greubel, Sep 25 2018
  • Mathematica
    Table[(4*(Floor[1/4 Mod[2*n + 4, 8]] - Floor[1/4 Mod[n + 2, 8]]) + 2*n)/2, {n, 0, 100}]
    f[n_] := Block[{id = IntegerDigits[n, 8]}, FromDigits[ Join[Most@ id /. {{} -> {0}}, {id[[-1]] /. {0 -> 2, 1 -> 3, 2 -> 0, 3 -> 1}}], 8]]; Array[f, 67, 0] (* or *)
    CoefficientList[ Series[(x^7 + x^5 + 3x^3 - 2x^2 - x + 2)/((x - 1)^2 (x^6 + x^4 + x^2 + 1)), {x, 0, 70}], x] (* or *)
    LinearRecurrence[{2, -2, 2, -2, 2, -2, 2, -1}, {2, 3, 0, 1, 4, 5, 6, 7}, 70] (* Robert G. Wilson v, Aug 01 2018 *)
  • Maxima
    makelist((4*(floor(mod(2*n + 4, 8)/4) - floor(mod(n + 2, 8)/4)) + 2*n)/2, n, 0, 100);
    
  • PARI
    my(x='x+O('x^100)); Vec((x^7+x^5+3*x^3-2*x^2-x+2)/((1-x)^2*(x^6+x^4+ x^2+1))) \\ G. C. Greubel, Sep 25 2018
    

Formula

a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - 2*a(n-6) + 2*a(n-7) - a(n-8), n > 7.
a(n) = (4*(floor(((2*n + 4) mod 8)/4) - floor(((n + 2) mod 8)/4)) + 2*n)/2.
a(n) = lod_4(A047247(n+1)).
a(4*n) = A047463(n+1).
a(4*n+1) = A047621(n+1).
a(4*n+2) = A047451(n+1).
a(4*n+3) = A047522(n+1).
a(A042948(n)) = A047596(n+1).
a(A042964(n+1)) = A047551(n+1).
G.f.: (x^7 + x^5 + 3*x^3 - 2*x^2 - x + 2)/((x-1)^2 * (x^2+1) * (x^4+1)).
E.g.f.: x*exp(x) + cos(x) + sin(x) + cos(x/sqrt(2))*cosh(x/sqrt(2)) + (sqrt(2)*cos(x/sqrt(2)) - sin(x/sqrt(2)))*sinh(x/sqrt(2)).
a(n+8) = a(n) + 8 . - Philippe Deléham, Mar 09 2023
Sum_{n>=3} (-1)^(n+1)/a(n) = 1/6 + log(2). - Amiram Eldar, Mar 12 2023

A203575 Array of certain four complete residue classes (nonnegative members), read by SW-NE antidiagonals.

Original entry on oeis.org

0, 1, 4, 2, 7, 8, 3, 6, 9, 12, 5, 10, 15, 16, 11, 14, 17, 20, 13, 18, 23, 24, 19, 22, 25, 28, 21, 26, 31, 32, 27, 30, 33, 36, 29, 34, 39, 40, 35, 38, 41, 44, 37, 42, 47, 48, 43, 46
Offset: 1

Views

Author

Wolfdieter Lang, Jan 12 2012

Keywords

Comments

See A193682 for the sequence called P_4, with period length 8, which defines the four complete residue classes [m], m = 0,1,2,3, via the equivalence relation p==q iff P_4(p) = P_4(q).
See a comment on A203571 for the general P_k sequences, and the multiplicative (but not additive) structure of these residue classes.
The row length sequence of this tabf array is [1,2,3,4,4,4,...].
This array defines a certain permutation of the nonnegative integers.

Examples

			The array starts
n\m  1   2   3   4
1:   0
2:   1   4
3:   2   7   8
4:   3   6   9  12
5:   5  10  15  16
6:  11  14  17  20
7:  13  18  23  24
8:  19  22  25  28
9:  21  26  31  32
10: 27  30  33  36
...
The sequence P_4(n)=A193682(n), n>=0, is repeated 0, 1, 2, 3, 0, 3, 2, 1, with period length 8. P_4(6)=2, hence 6 belongs to class [2].
Multiplicative structure: 11*23 == 3*1 = 3. Indeed: P_4(11*23) = P_4(253) = P_(5), because 253==5(mod 8), and P_(5)= 3, hence 11*23 belongs to class 3. In general, P_4(p*q) = P_4(P_4(p)*P_4(q)).
		

Crossrefs

Cf.A193682, A088520 (k=3), A090298 (k=5), A092260 (k=6), A113807 (k=7).

Formula

The nonnegative members of the four complete residue classes are (see a comment above for their definition):
[0]: 0, 4, 8, 12, 16, 20, 24, 28, 32, 36,... (A008586)
[1]: 1, 7, 9, 15, 17, 23, 25, 31, 33, 39,... (A047522)
[2]: 2, 6, 10, 14, 18, 22, 26, 30, 34, 38,... (A016825)
[3]: 3, 5, 11, 13, 19, 21, 27, 29, 35, 37,... (A047621)
In each class the corresponding negative numbers should be included.
Previous Showing 11-19 of 19 results.