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

A057128 Numbers n such that -3 is a square mod n.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 12, 13, 14, 19, 21, 26, 28, 31, 37, 38, 39, 42, 43, 49, 52, 57, 61, 62, 67, 73, 74, 76, 78, 79, 84, 86, 91, 93, 97, 98, 103, 109, 111, 114, 122, 124, 127, 129, 133, 134, 139, 146, 147, 148, 151, 156, 157, 158, 163, 169, 172, 181, 182, 183, 186, 193
Offset: 1

Views

Author

Henry Bottomley, Aug 10 2000

Keywords

Comments

The fact that there are no numbers in this sequence of the form 6k+5 leads to the result that all prime factors of central polygonal numbers (A002061 of the form n^2-n+1) are either 3 or of the form 6k+1. This in turn leads to there being an infinite number of primes of the form 6k+1, since if P=product[all known primes of form 6k+1] then all the prime factors of 9P^2-3P+1 must be unknown primes of form 6k+1.
Numbers that are not multiples of 8 or 9 and for which all prime factors greater than 3 are congruent to 1 mod 6. - Eric M. Schmidt, Apr 21 2013
Numbers that divide at least some member of A117950. - Robert Israel, Feb 19 2016

Examples

			a(7)=13 since -3 mod 13=10 mod 13=6^2 mod 13.
		

Crossrefs

Includes the primes in A045331 and these (primes congruent to {1, 2, 3} mod 6) are the prime factors of the terms in this sequence. Cf. A008784, A057125, A057126, A057127, A057129.
Cf. A117950.

Programs

  • Maple
    select(t -> numtheory:-quadres(-3,t) = 1, {$1..1000}); # Robert Israel, Feb 19 2016
  • Mathematica
    Select[Range[200], IntegerQ[PowerMod[-3, 1/2, #]]&] // Quiet (* Jean-François Alcover, Mar 05 2019 *)
  • PARI
    isok(n) = issquare(Mod(-3,n)); \\ Michel Marcus, Feb 19 2016
  • Sage
    def A057128(n) :
        if n%8==0 or n%9==0: return False
        for (p, m) in factor(n) :
            if p % 6 not in [1, 2, 3] : return False
            return True
    # Eric M. Schmidt, Apr 21 2013
    

A189833 a(n) = n^2 + 8.

Original entry on oeis.org

8, 9, 12, 17, 24, 33, 44, 57, 72, 89, 108, 129, 152, 177, 204, 233, 264, 297, 332, 369, 408, 449, 492, 537, 584, 633, 684, 737, 792, 849, 908, 969, 1032, 1097, 1164, 1233, 1304, 1377, 1452, 1529, 1608, 1689, 1772, 1857, 1944, 2033
Offset: 0

Views

Author

Keywords

Comments

From César Eliud Lozada, Mar 29 2021: (Start)
Numbers a(n) such that sqrt( a(n) + 4*n*sqrt(2) ) = n + 2*sqrt(2). Examples:
For n=1: sqrt( 9 + 4*sqrt(2)) = 1 + 2*sqrt(2),
For n=2: sqrt(12 + 8*sqrt(2)) = 2 + 2*sqrt(2),
For n=3: sqrt(17 + 12*sqrt(2)) = 3 + 2*sqrt(2). (End)

Crossrefs

Programs

Formula

From G. C. Greubel, Jan 13 2018: (Start)
G.f.: (8 - 15*x + 9*x^2)/(1 - x)^3.
E.g.f.: (8 + x + x^2)*exp(x). (End)
From Amiram Eldar, Jul 04 2020: (Start)
Sum_{n>=0} 1/a(n) = (1 + 2*sqrt(2)*Pi*coth(2*sqrt(2)*Pi))/16.
Sum_{n>=0} (-1)^n/a(n) = (1 + 2*sqrt(2)*Pi*cosech(2*sqrt(2)*Pi))/16. (End)
From Amiram Eldar, Feb 05 2024: (Start)
Product_{n>=0} (1 - 1/a(n)) = (sqrt(7/2)/2)*sinh(sqrt(7)*Pi)/sinh(2*sqrt(2)*Pi).
Product_{n>=0} (1 + 1/a(n)) = (3/(2*sqrt(2)))*sinh(3*Pi)/sinh(2*sqrt(2)*Pi). (End)

Extensions

Offset changed from 1 to 0 by Vincenzo Librandi, Apr 29 2011

A163253 An interspersion: the order array of the odd-numbered columns of the double interspersion at A161179.

Original entry on oeis.org

1, 4, 2, 9, 5, 3, 16, 10, 7, 6, 25, 17, 13, 11, 8, 36, 26, 21, 18, 14, 12, 49, 37, 31, 27, 22, 19, 15, 64, 50, 43, 38, 32, 28, 23, 20, 81, 65, 57, 51, 44, 39, 33, 29, 24, 100, 82, 73, 66, 58, 52, 45, 40, 34, 30, 121, 101, 91, 83, 74, 67, 59, 53, 46, 41, 35
Offset: 1

Views

Author

Clark Kimberling, Jul 23 2009

Keywords

Comments

A permutation of the natural numbers.
Row 1 consists of the squares.
Beginning with row 5, the columns obey a 3rd-order recurrence:
c(n)=c(n-1)+c(n-2)-c(n-3)+1; thus disregarding row 1, the nonsquares are partitioned by this recurrence.
Except for initial terms, the first ten rows match A000290, A002522, A002061, A059100, A014209, A117950, A027688, A087475, A027689, A117951, and the first column, A035106.

Examples

			Corner:
1....4....9...16...25
2....5...10...17...26
3....7...13...21...31
6...11...18...27...38
The double interspersion A161179 begins thus:
1....4....7...12...17...24
2....3....8...11...18...23
5....6...13...16...25...30
9...10...19...22...33...38
Expel the even-numbered columns, leaving
1....7...17...
2....8...18...
5...13...25...
9...19...33...
Then replace each of those numbers by its rank when all the numbers are jointly ranked.
		

Crossrefs

Formula

Let S(n,k) denote the k-th term in the n-th row. Three cases:
S(1,k)=k^2;
if n is even, then S(n,k)=k^2+(n-2)k+(n^2-2*n+4)/4;
if n>=3 is odd, then S(n,k)=k^2+(n-2)k+(n^2-2*n+1)/4.

Extensions

Edited and augmented by Clark Kimberling, Jul 24 2009

A189836 a(n) = n^2 + 11.

Original entry on oeis.org

11, 12, 15, 20, 27, 36, 47, 60, 75, 92, 111, 132, 155, 180, 207, 236, 267, 300, 335, 372, 411, 452, 495, 540, 587, 636, 687, 740, 795, 852, 911, 972, 1035, 1100, 1167, 1236, 1307, 1380, 1455, 1532, 1611, 1692, 1775, 1860, 1947
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

From G. C. Greubel, Jan 13 2018: (Start)
G.f.: (11 - 21*x + 12*x^2)/(1 - x)^3.
E.g.f.: (11 + x + x^2)*exp(x). (End)
From Amiram Eldar, Nov 02 2020: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(11)*Pi*coth(sqrt(11)*Pi))/22.
Sum_{n>=0} (-1)^n/a(n) = (1 + sqrt(11)*Pi*cosech(sqrt(11)*Pi))/22. (End)
From Amiram Eldar, Feb 12 2024: (Start)
Product_{n>=0} (1 - 1/a(n)) = sqrt(10/11)*sinh(sqrt(10)*Pi)/sinh(sqrt(11)*Pi).
Product_{n>=0} (1 + 1/a(n)) = 2*sqrt(3/11)*sinh(2*sqrt(3)*Pi)/sinh(sqrt(11)*Pi). (End)

A213921 Natural numbers placed in table T(n,k) layer by layer. The order of placement: at the beginning filled odd places of layer clockwise, next - even places clockwise. Table T(n,k) read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 10, 8, 9, 13, 17, 14, 6, 16, 21, 26, 22, 11, 12, 25, 31, 37, 32, 18, 15, 20, 36, 43, 50, 44, 27, 23, 24, 30, 49, 57, 65, 58, 38, 33, 19, 35, 42, 64, 73, 82, 74, 51, 45, 28, 29, 48, 56, 81, 91, 101, 92, 66, 59, 39, 34, 41, 63, 72, 100, 111
Offset: 1

Views

Author

Boris Putievskiy, Mar 05 2013

Keywords

Comments

A permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Layer is pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1). Enumeration table T(n,k) is layer by layer. The order of the list:
T(1,1)=1;
T(1,2), T(2,1), T(2,2);
. . .
T(1,n), T(3,n), ... T(n,3), T(n,1), T(2,n), T(4,n), ... T(n,4), T(n,2);
...

Examples

			The start of the sequence as table:
   1   2   5  10  17  26 ...
   3   4   8  14  22  32 ...
   7   9   6  11  18  27 ...
  13  16  12  15  23  33 ...
  21  25  20  24  19  28 ...
  31  36  30  35  29  34 ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   2,  3;
   5,  4,  7;
  10,  8,  9, 13;
  17, 14,  6, 16, 21;
  26, 22, 11, 12, 25, 31;
  ...
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    if i > j:
       result=i*i-(j%2)*i+2-int((j+2)/2)
    else:
       result=j*j-((i%2)+1)*j + int((i+3)/2)

Formula

As a table:
T(n,k) = n*n - (k mod 2)*n + 2 - floor((k+2)/2), if n>k;
T(n,k) = k*k - ((n mod 2)+1)*k + floor((n+3)/2), if n<=k.
As a linear sequence:
a(n) = i*i - (j mod 2)*i + 2 - floor((j+2)/2), if i>j;
a(n) = j*j - ((i mod 2)+1)*j + floor((i+3)/2), if i<=j; where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t = floor((-1+sqrt(8*n-7))/2).

A273324 Integers n such that n^2 + 3 is the sum of 4 but no fewer nonzero squares.

Original entry on oeis.org

2, 5, 6, 10, 11, 14, 18, 21, 22, 26, 27, 30, 34, 37, 38, 42, 43, 46, 50, 53, 54, 58, 59, 62, 66, 69, 70, 74, 75, 78, 82, 85, 86, 90, 91, 94, 98, 101, 102, 106, 107, 110, 114, 117, 118, 122, 123, 126, 130, 133, 134, 138, 139, 142, 146, 149, 150, 154, 155, 158, 162, 165, 166, 170
Offset: 1

Views

Author

Altug Alkan, May 20 2016

Keywords

Comments

If n^2 + k is a term of A004215, then the minimum positive value of k is 3, obviously.
See also the first differences (A278536) of this sequence.

Examples

			2 is in the sequence because 2^2 + 3 = 7 is a term of A004215.
		

Crossrefs

Programs

  • PARI
    isA004215(n) = {n\4^valuation(n, 4)%8==7}
    lista(nn) = for(n=1, nn, if(isA004215(n^2+3), print1(n, ", ")));

Formula

a(n) = A000196(1+A278491(n)). - Antti Karttunen, Nov 26 2016

A351468 Irregular triangle read by rows where row n is Newey's sequence containing all permutations of 1..n.

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 3, 1, 2, 1, 3, 1, 2, 3, 4, 1, 2, 3, 1, 4, 2, 1, 3, 1, 2, 3, 4, 5, 1, 2, 3, 4, 1, 5, 2, 3, 1, 4, 5, 2, 1, 3, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 1, 6, 2, 3, 4, 1, 5, 6, 2, 3, 1, 4, 5, 6, 2, 1, 3
Offset: 2

Views

Author

Kevin Ryde, Feb 23 2022

Keywords

Comments

Row n contains n^2 - 2*n + 4 = A117950(n-1) terms, numbered as columns k >= 1. Row n contains within it all permutations of 1..n as subsequences. These subsequences need not be consecutive terms (and in general are not).
Newey's construction (section 6) is an initial 1..n then successive term 1 and n-2 terms from a rotating block of 2..n. The effect is term 1 at k=1, k=n+1, then steps n-1 apart, and the rest filled with repeating 2..n.
Koutas and Hu (equation (1)) form the same by blocks D_k(m|n) which start with 1 and then appropriate parts of rotated 2..n like Newey.
Jon E. Schoenfield in A062714 starts from repeated 2..n and inserts 1's.
For n = 3 to 7, Newey shows these sequences are as short as possible (A062714) for any sequence containing all permutations, and noted the "obvious" conjecture that maybe they would be shortest always. But this is not so, since Jon E. Schoenfield gives a shorter n=16 in A062714, and Radomirovic constructs shorter for all n >= 10.

Examples

			Triangle begins
  n=2:  1,2,1,2
  n=3:  1,2,3,1,2,1,3
  n=4:  1,2,3,4,1,2,3,1,4,2,1,3
  n=5:  1,2,3,4,5,1,2,3,4,1,5,2,3,1,4,5,2,1,3
For row n=3, the permutations of 1,2,3 are located within the row as follows (some are present in multiple ways too).
   1,2,3,1,2,1,3     row n=3
   1-2-3             \
   1---3---2         | all permutations
           2-1-3     | of 1,2,3 within
     2-3-1           | row n=3
       3-1-2         |
       3---2-1       /
For row n=4, see example in A062714.
For row n=5, the pattern of 1's among repeating 2..5 is
    2,3,4,5,  2,3,4,  5,2,3,  4,5,2,  3
  1,        1,      1,      1,      1,
   \-------/ \-----/ \-----/ \-----/
    5 apart,   thereafter 4 apart
		

Crossrefs

Cf. A117950 (row lengths), A062714 (shortest possible).
Cf. A351469 (Adelman's sequences).

Programs

  • PARI
    T(n,k) = if(k<=n,k, my(q,r);[q,r]=divrem(k-2,n-1); if(r==0&&q
    				
  • PARI
    row(n) = my(r=1,t=1); vector((n-1)^2+3,i, if(i==1,1, r++>n,r=1+(n>2);1, if(t++>n,t=2, t)));

Formula

T(n,k) = k for 1 <= k <= n, otherwise.
T(n,k) = 1 if r=0 and q
T(n,k) = 2 + ((r-q) mod (n-1)),
where division q = floor((k-2)/(n-1)) remainder r = (k-2) mod (n-1). [Adapted from Jon E. Schoenfield in A062714.]

A171746 Let f(n) = n + floor(sqrt(n)). Then a(n) is the smallest number of iterations of f on n such that a perfect square is obtained.

Original entry on oeis.org

3, 2, 1, 5, 2, 4, 1, 3, 7, 2, 4, 6, 1, 3, 5, 9, 2, 4, 6, 8, 1, 3, 5, 7, 11, 2, 4, 6, 8, 10, 1, 3, 5, 7, 9, 13, 2, 4, 6, 8, 10, 12, 1, 3, 5, 7, 9, 11, 15, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 17, 2, 4, 6, 8, 10, 12, 14, 16, 1, 3, 5, 7, 9, 11, 13, 15, 19, 2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 3, 5
Offset: 1

Author

Neven Juric (neven.juric(AT)apis-it.hr), Oct 07 2010

Keywords

Comments

Iterate A028392, starting with n: a(n) is the number of steps until a square will be reached. - Reinhard Zumkeller, Feb 23 2012

Examples

			f(9)=12, f(12)=15, f(15)=18, f(18)=22, f(22)=26, f(26)=31, f(31)=36. The first square number in this sequence 12,15,18,22,26,31,36 is on the seventh place and therefore a(9)=7.
		

References

  • Matematicko-fizicki list 1/144, problem 2-2, page 29, (1985-1986).

Crossrefs

Programs

  • Haskell
    a171746 = (+ 1) . length . takeWhile (== 0) .
                               map a010052 . tail . iterate a028392
    -- Reinhard Zumkeller, Feb 23 2012, Oct 14 2010
    
  • Mathematica
    f[n_] := Length@ NestWhileList[ # + Floor@Sqrt@# &, n, ! IntegerQ@Sqrt@# || # == n &] - 1; Array[f, 93] (* Robert G. Wilson v, Oct 08 2010 *)
  • PARI
    f(n) = n + sqrtint(n); \\ A028392
    a(n) = my(k=1); while (!issquare(n=f(n)), k++); k; \\ Michel Marcus, Nov 06 2022

Formula

From Robert G. Wilson v, Oct 08 2010: (Start)
a(k)=1 for A002061(n): n^2 - n + 1 for n>1;
a(k)=2 for A002522(n): n^2 + 1 for n>1;
a(k)=3 for A014206(n): n^2 + n + 2 for n>1;
a(k)=4 for A059100(n): n^2 + 2 for n>1;
a(k)=5 for A027688(n): n^2 + n + 3 for n>2;
a(k)=6 for A117950(n): n^2 + 3 for n>2;
a(k)=7 for A027689(n): n^2 + n + 4 for n>4;
a(k)=8 for A087475(n): n^2 + 4 for n>3;
a(k)=9 for A027690(n): n^2 + n + 5 for n>4; ... (End)
a(n^2) = 2*n + 1: a(A000290(n)) = A005408(n). - Reinhard Zumkeller, Oct 14 2010

A255844 a(n) = 2*n^2 + 6.

Original entry on oeis.org

6, 8, 14, 24, 38, 56, 78, 104, 134, 168, 206, 248, 294, 344, 398, 456, 518, 584, 654, 728, 806, 888, 974, 1064, 1158, 1256, 1358, 1464, 1574, 1688, 1806, 1928, 2054, 2184, 2318, 2456, 2598, 2744, 2894, 3048, 3206, 3368, 3534, 3704, 3878, 4056, 4238, 4424, 4614
Offset: 0

Author

Avi Friedlich, Mar 08 2015

Keywords

Comments

This is the case k=3 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2. Also, it is noted that a(n)*n = (n + 1)^3 + (n - 1)^3.
Equivalently, numbers m such that 2*m-12 is a square.
For n = 0..16, 3*a(n)-1 is prime (see A087370); for n = 0..12, 3*a(n)-5 is prime (see A107303).

Crossrefs

Cf. A016825 (first differences), A087370, A107303, A114949, A117950.
Cf. A152811: nonnegative numbers of the form 2*m^2-6.
Subsequence of A000378.
Cf. similar sequences listed in A255843.

Programs

  • Magma
    [2*n^2+6: n in [0..50]];
  • Mathematica
    Table[2 n^2 + 6, {n, 0, 50}]
  • PARI
    vector(50, n, n--; 2*n^2+6)
    
  • Sage
    [2*n^2+6 for n in (0..50)]
    

Formula

G.f.: 2*(3-5*x+4*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 2*A117950(n).
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(3)*Pi*coth(sqrt(3)*Pi))/12.
Sum_{n>=0} (-1)^n/a(n) = (1 + (sqrt(3)*Pi)*cosech(sqrt(3)*Pi))/12. (End)
E.g.f.: 2*exp(x)*(3 + x + x^2). - Elmo R. Oliveira, Jan 25 2025

Extensions

Corrected and extended by Bruno Berselli, Mar 11 2015

A328791 Triangular numbers of the form k^2 + 3.

Original entry on oeis.org

3, 28, 903, 30628, 1040403, 35343028, 1200622503, 40785822028, 1385517326403, 47066803275628, 1598885794044903, 54315050194251028, 1845112820810490003, 62679520857362409028, 2129258596329511416903, 72332112754346025765628, 2457162575051435364614403
Offset: 1

Author

Jon E. Schoenfield, Oct 27 2019

Keywords

Comments

There exist triangular numbers of the form k^2 + j for j=0 (A001110), j=1 (A164055), j=2 (A214838), and j=3 (this sequence), but not for j=4,7,8,13,16,18,... (A328792).

Crossrefs

Intersection of A000217 and A117950.
Cf. A276598 (the k's).

Programs

Formula

a(1) = 3, a(2) = 28; for n > 2, a(n) = 34*a(n-1) - a(n-2) - 46.
Previous Showing 11-20 of 33 results. Next