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 21-30 of 33 results. Next

A252041 Numbers m such that m - 3 divides m^m + 3.

Original entry on oeis.org

1, 2, 4, 5, 6, 9, 10, 85, 105, 136, 186, 262, 820, 1161, 2626, 2926, 4924, 10396, 11656, 19689, 27637, 33736, 36046, 42886, 42901, 53866, 55189, 82741, 95266, 103762, 106822, 127401, 135460, 251506, 366796, 375220, 413326, 466966, 531445, 553456, 568876
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 12 2014

Keywords

Comments

Numbers m such that (m^m + 3)/(m - 3) is an integer.
Most but not all terms are congruent to 4 modulo 6. - Robert G. Wilson v, Dec 19 2014
Note that m^m == 3^m (mod m-3). - Robert Israel, Dec 19 2014

Examples

			2 is in this sequence because (2^2 + 3)/(2 - 3) = -7 is an integer.
4 is in this sequence because (4^4 + 3)/(4 - 3) = 259 is an integer.
7 is not in the sequence because (7^7 + 3)/4 = 411773/2, which is not an integer.
		

Crossrefs

Cf. ...............Numbers n such that x divides y, where:
...x......y....k = 0.....k = 1.....k = 2......k = 3.......
..n-k..n^n-k..A000027...A087156...A242787....A242788......
..n-k..n^n+k..A000027..see below..A249751..this sequence..
..n+k..n^n-k..A000027...A004275...A251603....A251862......
..n+k..n^n+k..A000027...A004273...A213382....A242800......
(For x=n-1 and y=n^n+1, the only terms are 0, 2 and 3. - David L. Harden, Dec 28 2014)

Programs

  • Magma
    [n: n in [4..50000] | Denominator((n^n+3)/(n-3)) eq 1];
    
  • Maple
    select(t -> 3 &^t + 3 mod (t-3) = 0, [1,2,$4..10^6]); # Robert Israel, Dec 19 2014
  • Mathematica
    fQ[n_] := Mod[PowerMod[n, n, n - 3] + 3, n - 3] == 0; Select[Range@ 1000000, fQ] (* Michael De Vlieger, Dec 13 2014; modified by Robert G. Wilson v, Dec 19 2014 *)
  • PARI
    isok(n) = (n != 3) && (Mod(n, n-3)^n  == -3); \\ Michel Marcus, Dec 13 2014

Extensions

More terms from Michel Marcus, Dec 13 2014

A110185 Coefficients of x in the partial quotients of the continued fraction expansion exp(1/x) = [1, x - 1/2, 12*x, 5*x, 28*x, 9*x, 44*x, 13*x, ...]. The partial quotients all have the form a(n)*x except the constant term of 1 and the initial partial quotient which equals (x - 1/2).

Original entry on oeis.org

0, 1, 12, 5, 28, 9, 44, 13, 60, 17, 76, 21, 92, 25, 108, 29, 124, 33, 140, 37, 156, 41, 172, 45, 188, 49, 204, 53, 220, 57, 236, 61, 252, 65, 268, 69, 284, 73, 300, 77, 316, 81, 332, 85, 348, 89, 364, 93, 380, 97, 396, 101, 412, 105, 428, 109, 444, 113, 460, 117, 476
Offset: 0

Views

Author

Paul D. Hanna, Jul 14 2005

Keywords

Comments

Simple continued fraction expansion of 2*(e - 1)/(e + 1) = 2*tanh(1/2) = 1/(1 + 1/(12 + 1/(5 + 1/(28 + ...)))). - Peter Bala, Oct 01 2023

Crossrefs

Cf. continued fraction expansions: A004273 ( tanh(1) ), A204877 ( 3*tanh(1/3) ), A130824 ( tanh(1/2) ).

Programs

  • PARI
    a(n)=polcoeff(x*(1+12*x+3*x^2+4*x^3)/(1-x^2)^2+x*O(x^n),n)

Formula

G.f.: x*((1+3*x^2) + 4*x*(3+x^2))/(1-x^2)^2 = sum_{n>=0} a(n)*x^n.
From Carl R. White, Feb 11 2010: (Start)
a(n) = sign(n) * (2*n+1) * (3*cos(Pi*n)+5)/2.
a(2n+1) = a(2n-1) + 4, a(2n+2) = a(2n) + 16, with a(0)=0, a(1)=1, a(2)=12. (End)
a(n) = (5+3*(-1)^n)*(2*n-1)/2, with a(0)=0. Sum_{i=0..n} a(i) = A085787(A042948(n)). - Bruno Berselli, Jan 20 2012

A204877 Continued fraction expansion of 3*tanh(1/3).

Original entry on oeis.org

0, 1, 27, 5, 63, 9, 99, 13, 135, 17, 171, 21, 207, 25, 243, 29, 279, 33, 315, 37, 351, 41, 387, 45, 423, 49, 459, 53, 495, 57, 531, 61, 567, 65, 603, 69, 639, 73, 675, 77, 711, 81, 747, 85, 783, 89, 819, 93, 855, 97, 891, 101, 927, 105, 963, 109, 999, 113
Offset: 0

Views

Author

Bruno Berselli, Jan 23 2012

Keywords

Comments

The continued fraction expansions of tanh(1) and 2*tanh(1/2) are in A004273 and A110185, respectively.

Crossrefs

Programs

  • Magma
    I:=[0,1,27,5,63]; [n le 5 select I[n] else 2*Self(n-2)-Self(n-4): n in [1..58]];
    
  • Mathematica
    ContinuedFraction[3 Tanh[1/3], 158]
    CoefficientList[Series[x (1 + 27 x + 3 x^2 + 9 x^3) / ((1 - x)^2 (1 + x)^2), {x, 0, 60}], x] (* Vincenzo Librandi, Jun 14 2013 *)
  • Maxima
    makelist(coeff(taylor(x*(1+27*x+3*x^2+9*x^3)/((1-x)^2*(1+x)^2), x, 0, n), x, n), n, 0, 57);
  • PARI
    \p232;
           contfrac(3*tanh(1/3))
    

Formula

G.f.: x*(1+27*x+3*x^2+9*x^3)/((1-x)^2*(1+x)^2).
E.g.f.: 9-4*exp(-x)*(1+2*x)+5*exp(x)*(-1+2*x).
a(n) = (5+4*(-1)^n)*(2*n-1), with a(0)=0.
a(n) = 2*a(n-2)-a(n-4) for n>4.
a(n) = a(n-2)+A040314(n-2) for n>2.
a(n)*a(n+1) = a(2*n^2).
Sum(a(i), i=0..n) = A195162(A042948(n)).

A251862 Numbers m such that m + 3 divides m^m - 3.

Original entry on oeis.org

3, 7, 10, 27, 727, 1587, 9838, 758206, 789223, 1018846, 1588126, 1595287, 2387206, 4263586, 9494746, 12697378, 17379860, 21480726, 25439767, 38541526, 44219926, 55561536, 62072326, 64335356, 70032586, 83142466, 85409276
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 10 2014

Keywords

Comments

m such that m+3 divides (-3)^m - 3. - Robert Israel, Dec 14 2014

Examples

			3 is in this sequence because 3 + 3 = 6 divides 3^3 - 3 = 24.
		

Crossrefs

Cf. ...............Numbers n such that x divides y, where:
...x.....y......k=0.......k=1.......k=2........k=3........
..n-k..n^n-k..A000027...A087156...A242787....A242788......
..n-k..n^n+k..A000027..see below..A249751....A252041......
..n+k..n^n-k..A000027...A004275...A251603..this sequence..
..n+k..n^n+k..A000027...A004273...A213382....A242800......
(For x=n-1 and y=n^n+1, the only terms are 0, 2 and 3. - David L. Harden, Jan 14 2015)

Programs

  • Magma
    [n: n in [2..10000] | Denominator((n^n-3)/(n+3)) eq 1];
    
  • Maple
    select(t ->((-3) &^ (t) - 3) mod (t+3) = 0, [$1..10^6]); # Robert Israel, Dec 14 2014
  • Mathematica
    a251862[n_] := Select[Range[n], Mod[PowerMod[#, #, # + 3] - 3, # + 3] == 0 &]; a251862[10^6] (* Michael De Vlieger, Dec 14 2014, after Robert G. Wilson v at A252041 *)
  • PARI
    isok(n) = Mod(n, n+3)^n == 3; \\ Michel Marcus, Dec 10 2014
    
  • Python
    A251862_list = [n for n in range(10**6) if pow(-3, n, n+3) == 3] # Chai Wah Wu, Jan 19 2015
  • Sage
    [n for n in range(10^4) if (n + 3).divides((-3)^n - 3)] # Peter Luschny, Jan 17 2015
    

Extensions

More terms from Michel Marcus, Dec 10 2014

A290057 Number T(n,k) of X-rays of n X n binary matrices with exactly k ones; triangle T(n,k), n>=0, 0<=k<=n^2, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 4, 3, 1, 1, 5, 13, 23, 30, 30, 23, 13, 5, 1, 1, 7, 26, 68, 139, 234, 334, 411, 440, 411, 334, 234, 139, 68, 26, 7, 1, 1, 9, 43, 145, 386, 860, 1660, 2838, 4362, 6090, 7779, 9135, 9892, 9892, 9135, 7779, 6090, 4362, 2838, 1660, 860, 386, 145, 43, 9, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 19 2017

Keywords

Comments

The X-ray of a matrix is defined as the sequence of antidiagonal sums.
T(n,k) is defined for all n,k >= 0. The triangle contains only the positive terms. T(n,k) = 0 for k>n^2.

Examples

			Triangle T(n,k) begins:
  1;
  1, 1;
  1, 3,  4,  3,   1;
  1, 5, 13, 23,  30,  30,  23,  13,   5,   1;
  1, 7, 26, 68, 139, 234, 334, 411, 440, 411, 334, 234, 139, 68, 26, 7, 1;
  ...
		

Crossrefs

Columns k=0-2 give: A000012, A004273, A091823(n-1) for n>1.
Main diagonal gives A290052.
Row sums give A010790.

Programs

  • Maple
    b:= proc(n, i, t) option remember; (m-> `if`(n>m, 0, `if`(n=m, 1,
          add(b(n-j, i-t, 1-t), j=0..min(i, n)))))(i*(i+1-t))
        end:
    T:= (n, k)-> b(k, n, 1):
    seq(seq(T(n, k), k=0..n^2), n=0..7);
  • Mathematica
    b[n_,i_,t_]:= b[n, i, t] = Function[{m, jm}, If[n>m, 0, If[n==m, 1, Sum[b[n-j, i-t, 1-t], {j, 0, jm}]]]][i*(i+1-t), Min[i, n]]; T[n_, k_]:= b[k, n, 1]; Table[T[n, k], {n, 0, 7}, {k, 0, n^2}] // Flatten (* Jean-François Alcover, Aug 09 2017, translated from Maple *)

Formula

T(n,floor(n^2/2)) = A290058(n).
T(n,k) = T(n,n^2-k).

A166264 If the n-th prime is denoted by p(n) then a(j) = frequency with which each distinct value of (Sum of the quadratic non-residues of p(n) - Sum of the quadratic residues of p(n)) / p(n) occurs.

Original entry on oeis.org

174195, 6, 16, 25, 31, 34, 41, 37, 68, 45, 47, 85, 68, 95, 93, 83, 73, 101, 103, 85, 115, 109, 106, 154, 107, 132, 159, 114, 163, 179, 128, 132, 216, 164, 120, 209, 150, 119, 237, 216, 175, 228, 150, 221, 222, 192, 214, 262, 241, 185, 289, 196, 181, 379, 189
Offset: 1

Views

Author

Keywords

Comments

The table below shows a(j) for each distinct value of (Sum of the quadratic non-residues of p(n) - Sum of the quadratic residues of p(n)) / p(n) for 1 <= n <= 348513, with p(348513) = 4999999 (< 5*10^6).
a(1) appears to increase indefinitely, so the static sequence starts at a(2).
j (SQN-SQR)/p(n) a(j)
-- -------------- ------
1 0 174195
2 1 6
3 3 16
4 5 25
5 7 31
6 9 34
7 11 41
8 13 37
9 15 68
10 17 45
11 19 47
12 21 85
13 23 68
14 25 95
15 27 93
16 29 83
17 31 73
18 33 101
19 35 103
20 37 85
21 39 115
22 41 109
23 43 106
24 45 154
25 47 107
26 49 132
27 51 159
28 53 114
29 55 163
30 57 179
31 59 128
32 61 132
33 63 216
34 65 164
35 67 120
36 69 209
37 71 150
38 73 119
39 75 237
40 77 216
41 79 175
42 81 228
43 83 150
44 85 221
45 87 222
46 89 192
47 91 214
48 93 262
49 95 241
50 97 185
51 99 289
52 101 196
53 103 181
54 105 379
55 107 189
56 109 209
57 111 314
58 113 239

Crossrefs

A252606 Numbers j such that j + 2 divides 2^j + 2.

Original entry on oeis.org

3, 4, 16, 196, 2836, 4551, 5956, 25936, 46775, 65536, 82503, 540736, 598816, 797476, 1151536, 3704416, 4290771, 4492203, 4976427, 8095984, 11272276, 13362420, 21235696, 21537831, 21549347, 29640832, 31084096, 42913396, 49960912, 51127259, 55137316, 56786087, 60296571, 70254724, 70836676
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 03 2015

Keywords

Comments

Numbers j such that (2^j + 2)/(j + 2) is an integer. Numbers j such that (2^j - j)/(j + 2) is an integer.
From Robert Israel, Apr 09 2015: (Start)
The even members of this sequence (4, 16, 196, 2836, ...) are the numbers 2*k-2 where k>=3 is odd and 4^k == -8 (mod k).
The odd members of this sequence (3, 4551, 46775, 82503, ...) are the numbers k-2 where k>=3 is odd and 2^k == -8 (mod k). (End)
2^m is in this sequence for m = (2, 4, 16, 36, 120, 256, 456, 1296, 2556, ...), with the subsequence m = 2^k, k = (1, 2, 4, 8, 16, ...). - M. F. Hasler, Apr 09 2015

Examples

			3 is in this sequence because (2^3 + 2)/(3 + 2) = 2.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..1200000] | Denominator((2^n+2)/(n+2)) eq 1];
    
  • Maple
    select(t -> 2 &^t + 2 mod (t + 2) = 0, [$1..10^6]); # Robert Israel, Apr 09 2015
  • Mathematica
    Select[Range[10^6],IntegerQ[(2^#+2)/(#+2)]&] (* Ivan N. Ianakiev, Apr 17 2015 *)
  • PARI
    for(n=1,10^5,if((2^n+2)%(n+2)==0,print1(n,", "))) \\ Derek Orr, Apr 05 2015
    
  • PARI
    is(n)=Mod(2,n+2)^n==-2 \\ M. F. Hasler, Apr 09 2015
    
  • Python
    A252606_list = [n for n in range(10**4) if pow(2, n, n+2) == n] # Chai Wah Wu, Apr 16 2015

Extensions

a(17)-a(22) from Tom Edgar, Mar 03 2015
More terms from Chai Wah Wu, Apr 16 2015

A357778 Maximum number of edges in a 5-degenerate graph with n vertices.

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235
Offset: 1

Views

Author

Allan Bickle, Oct 13 2022

Keywords

Comments

A maximal 5-degenerate graph can be constructed from a 5-clique by iteratively adding a new 5-leaf (vertex of degree 5) adjacent to five existing vertices.
This is also the number of edges in a 5-tree with n>5 vertices. (In a 5-tree, the neighbors of a newly added vertex must form a clique.)

Examples

			For n < 7, the only maximal 5-degenerate graph is complete.
		

References

  • Allan Bickle, Fundamentals of Graph Theory, AMS (2020).
  • J. Mitchem, Maximal k-degenerate graphs, Util. Math. 11 (1977), 101-106.

Crossrefs

Number of edges in a maximal k-degenerate graph for k=2..6: A004273, A296515, A113127, A357778, A357779.

Formula

a(n) = C(n,2) for n < 7.
a(n) = 5*n-15 for n > 4.

A357779 Maximum number of edges in a 6-degenerate graph with n vertices.

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 21, 27, 33, 39, 45, 51, 57, 63, 69, 75, 81, 87, 93, 99, 105, 111, 117, 123, 129, 135, 141, 147, 153, 159, 165, 171, 177, 183, 189, 195, 201, 207, 213, 219, 225, 231, 237, 243, 249, 255, 261, 267, 273, 279
Offset: 1

Views

Author

Allan Bickle, Oct 13 2022

Keywords

Comments

A maximal 6-degenerate graph can be constructed from a 6-clique by iteratively adding a new 6-leaf (vertex of degree 6) adjacent to six existing vertices.
This is also the number of edges in a 6-tree with n>6 vertices. (In a 6-tree, the neighbors of a newly added vertex must form a clique.)

Examples

			For n < 8, the only maximal 6-degenerate graph is complete.
		

References

  • Allan Bickle, Fundamentals of Graph Theory, AMS (2020).
  • J. Mitchem, Maximal k-degenerate graphs, Util. Math. 11 (1977), 101-106.

Crossrefs

Number of edges in a maximal k-degenerate graph for k=2..6: A004273, A296515, A113127, A357778, A357779.

Formula

a(n) = C(n,2) for n < 8.
a(n) = 6*n-21 for n > 5.

A166131 a(j) = minimum value of n for each distinct increasing value of (Sum of the quadratic non-residues of prime(n) - Sum of the quadratic residues of prime(n)) / prime(n) for each j.

Original entry on oeis.org

1, 4, 9, 15, 20, 46, 39, 43, 52, 76, 64, 83, 118, 92, 166, 154, 128, 146, 173, 236, 228, 190, 283, 215, 434, 240, 246, 395, 607, 377, 357, 536, 349, 492, 519, 444, 722, 430, 635, 814, 598, 512, 541, 562, 700, 821, 633, 708, 893, 729, 738
Offset: 1

Views

Author

Keywords

Examples

			The table below shows for each value of a(j) the corresponding values of prime(a(j)) and (Sum of the quadratic non-residues of prime(a(j)) - Sum of the quadratic residues of prime(a(j))) / prime(a(j))
.
   j      a(j)    prime(a(j))   (SQN-SQR)/prime(a(j))
  --      ----    -----------   ---------------------
   1         1          2          0
   2         4          7          1
   3         9         23          3
   4        15         47          5
   5        20         71          7
   6        46        199          9
   7        39        167         11
   8        43        191         13
   9        52        239         15
  10        76        383         17
  11        64        311         19
  12        83        431         21
  13       118        647         23
  14        92        479         25
  15       166        983         27
  16       154        887         29
  17       128        719         31
  18       146        839         33
  19       173       1031         35
  20       236       1487         37
  21       228       1439         39
  22       190       1151         41
  23       283       1847         43
  24       215       1319         45
  25       434       3023         47
  26       240       1511         49
  27       246       1559         51
  28       395       2711         53
  29       607       4463         55
  30       377       2591         57
  31       357       2399         59
  32       536       3863         61
  33       349       2351         63
  34       492       3527         65
  35       519       3719         67
  36       444       3119         69
  37       722       5471         71
  38       430       2999         73
  39       635       4703         75
  40       814       6263         77
  41       598       4391         79
  42       512       3671         81
  43       541       3911         83
  44       562       4079         85
  45       700       5279         87
  46       821       6311         89
  47       633       4679         91
  48       708       5351         93
  49       893       6959         95
  50       729       5519         97
  51       738       5591         99
		

Crossrefs

Extensions

Sequence corrected and comments added by Christopher Hunt Gribble, Oct 10 2009
Previous Showing 21-30 of 33 results. Next