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.

A080782 a(1)=1, a(n)=a(n-1)-1 if n is already in the sequence, a(n)=a(n-1)+2 otherwise.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Mar 07 2003

Keywords

Comments

Permutation of the integers: exchange trisections starting with 2 and 3.
a(a(n)) = n. - Reinhard Zumkeller, Oct 29 2004

Crossrefs

Programs

  • Mathematica
    Array[#+Mod[#+1,3]&,70,0] (* or *) LinearRecurrence[{1,0,1,-1},{1,3,2,4},70] (* Harvey P. Dale, Mar 29 2013 *)
    {#,#+1,#-1}[[Mod[#,3,1]]]&/@Range[99] (* Federico Provvedi, May 15 2021 *)

Formula

a(n) = A064429(n-1) + 1.
a(n) - n is periodic with period 3.
G.f.: x*(1+2*x-x^2+x^3)/(1-x-x^3+x^4). - Jaume Oliver Lafont, Mar 24 2009
a(0)=1, a(1)=3, a(2)=2, a(3)=4, a(n)=a(n-1)+0*a(n-2)+a(n-3)-a(n-4). - Harvey P. Dale, Mar 29 2013
a(n) = n + (2/sqrt(3))*sin(2*(n+2)*Pi/3). - Wesley Ivan Hurt, Sep 26 2017
From Guenther Schrack, Oct 23 2019: (Start)
a(n) = a(n-3) + 3 with a(1) = 1, a(2) = 3, a(3) = 2 for n > 3.
a(n) = n - (w^(2*n)*(2 + w) + w^n*(1 - w))/3 where w = (-1 + sqrt(-3))/2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*Pi/(3*sqrt(3)) - log(2)/3. - Amiram Eldar, Jan 31 2023
From Charles L. Hohn, Sep 03 2024: (Start)
a(n) = n-1+n%3.
a(n) = A375336(n-2, 1) for n >= 6. (End)

A374602 Array of successive integer solutions to sqrt((d-c)*b^2 + c*(b+1)^2) for nonsquare integers d >= 2 (d=A000037(n) for n >= 1), where b and c are positive integers and c < d, read by antidiagonals.

Original entry on oeis.org

5, 29, 3, 169, 11, 5, 985, 41, 13, 3, 5741, 153, 34, 7, 4, 33461, 571, 89, 18, 5, 10, 195025, 2131, 233, 29, 11, 11, 4, 1136689, 7953, 610, 69, 28, 23, 5, 7, 6625109, 29681, 1597, 178, 62, 58, 13, 8, 6, 38613965, 110771, 4181, 287, 79, 338, 14, 13, 22, 4
Offset: 1

Views

Author

Charles L. Hohn, Jul 13 2024

Keywords

Comments

T(n,k) is the diagonal lengths of increasingly nearly regular d-dimensional Pythagorean hyperrectangles.
Each row n divides into equal length, geometrically periodic subsequences, each with its own subsequence period length (A377290) and geometric growth factor (A377291); it is conjectured that this is the case for all n, and that all solutions conform as such and that there are no solutions that do not, but these are not proven.
It is also not known if there is an algorithm for generating values for all rows other than testing all possible values for a row until a subsequence pattern emerges.
Square d produce solutions following a different pattern, shown as A375336.

Examples

			n=row index; d=nonsquare integer of index n (A000037(n)):
 n    d   T(n,k)
---+----+-------------------------------------------------------------
 1 |  2 |  5, 29, 169, 985, 5741, 33461, 195025, 1136689, 6625109, ...
 2 |  3 |  3, 11,  41, 153,  571,  2131,   7953,   29681,  110771, ...
 3 |  5 |  5, 13,  34,  89,  233,   610,   1597,    4181,   10946, ...
 4 |  6 |  3,  7,  18,  29,   69,   178,    287,     683,    1762, ...
 5 |  7 |  4,  5,  11,  28,   62,    79,    175,     446,     988, ...
 6 |  8 | 10, 11,  23,  58,  338,   373,    781,    1970,   11482, ...
 7 | 10 |  4,  5,  13,  14,   25,    62,    111,     148,     185, ...
 8 | 11 |  7,  8,  13,  32,   57,   139,    158,     259,     638, ...
 9 | 12 |  6, 22,  39,  69,   82,   125,    306,     543,    1142, ...
10 | 13 |  4,  5,   7,  17,   30,    43,     53,      76,     185, ...
11 | 14 |  9, 11,  14,  19,   46,    81,    267,     329,     418, ...
12 | 15 |  6, 10,  21,  23,   30,    39,     94,     165,     362, ...
13 | 17 | 25, 27,  34,  41,   98,   171,    260,    1649,    1779, ...
14 | 18 |  6, 13,  15,  18,   21,    50,     87,     132,     198, ...
15 | 19 |  5,  7,   8,   9,   11,    31,     34,      37,      56, ...
16 | 20 | 10, 26,  68, 125,  159,   178,    197,     466,     807, ...
17 | 21 |  6,  9,  12,  13,   14,    33,     57,      86,     134, ...
18 | 22 |  5,  7,   8,  17,   18,    19,     31,      64,      77, ...
19 | 23 | 16, 19,  27,  28,   29,    68,    117,     176,     764, ...
20 | 24 |  6,  9,  11,  14,   36,    39,     57,      58,      59, ...
...
sqrt((2-1)*1^2 + 1*(1+1)^2) = sqrt(5) -> not an integer so not included.
sqrt((2-1)*3^2 + 1*(3+1)^2) = 5 -> T(1,1).
sqrt((2-1)*20^2 + 1*(20+1)^2) = 29 -> T(1,2).
sqrt((3-2)*1^2 + 2*(1+1)^2) = 3 -> T(2,1).
sqrt((6-2)*7^2 + 2*(7+1)^2) = 18 -> T(4,3).
		

Crossrefs

Row 1 is A001653 starting at n=2.
Row 2 is A079935 starting at n=2.
Bisection of row 2 starting with the first term is A189356 starting at n=1.
Bisection of row 2 starting with the second term is A122769 starting at n=2.
Row 3 is A001519 starting at n=3.
Bisection of row 3 starting with the first term is A033889 starting at n=1.
Bisection of row 3 starting with the second term is A033891 starting at n=1.
Row 4 is A131093 starting at n=3.

Programs

  • PARI
    row(n, c)=my(v=List(), d=n+floor(sqrt(n)+1/2) /* d=A000037(n) */, t=ceil(sqrt(d))); while(#v
    				

Formula

T(n, 1) = A373666(A000037(n)).

A376005 For integers >=2, the number of integer solutions to sqrt((n^2-c)*b^2 + c*(b+1)^2) where b and c are positive integers and c < n^2.

Original entry on oeis.org

0, 0, 2, 2, 4, 6, 10, 8, 14, 16, 18, 22, 26, 22, 38, 36, 36, 44, 48, 42, 60, 62, 62, 64, 78, 68, 88, 90, 78, 102, 114, 92, 120, 104, 118, 134, 144, 122, 148, 156, 138, 168, 178, 142, 194, 194, 186, 192, 200, 188, 232, 230, 212, 218, 252, 224, 274, 272, 236
Offset: 2

Views

Author

Charles L. Hohn, Sep 05 2024

Keywords

Comments

a(n) = count(k) of A375336(n, k) for each n >= 2.
Omitting n < 2, which yield no c values that meet the rubric.

Examples

			A375336 rows n = 2 and n = 3 are empty, so a(2) = 0 and a(3) = 0.
A375336 rows n = 4 and n = 5 each contain 2 terms, so a(4) = 2 and a(5) = 2.
		

Crossrefs

Cf. A375336.

Programs

  • PARI
    a(n)=my(d=n^2, t=n, an=0); while(t<=n^3/8, my(b=floor(sqrt(t^2/d)), r=t^2-d*b^2); if (r && r%(b*2+1)==0, an++); t++); an
    for(n=2, 100, print(n, " ", a(n)))

A376007 For integers n>=4, greatest integer that can satisfy sqrt((n^2-c)*b^2 + c*(b+1)^2) where b and c are positive integers and c < n^2.

Original entry on oeis.org

7, 8, 27, 19, 61, 42, 125, 83, 211, 137, 343, 204, 505, 299, 729, 428, 991, 578, 1331, 749, 1717, 964, 2197, 1229, 2731, 1523, 3375, 1846, 4081, 2229, 4913, 2678, 5815, 3164, 6859, 3687, 7981, 4286, 9261, 4967, 10627, 5693, 12167, 6464, 13801, 7327, 15625
Offset: 4

Views

Author

Charles L. Hohn, Sep 05 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n)=my(d=n^2, t=ceil(n^3/8)); while(t>=n, my(b=floor(sqrt(t^2/d)), r=t^2-d*b^2); if (r && r%(b*2+1)==0, return(t)); t--)
    for(n=4, 100, print(n, " ", a(n)))
    
  • PARI
    a(n)=if(n%4==2, 2*n^3, n%4==0, 2*n^3-8*n+16, abs(n%8-4)==1, n^3-n+8, n^3-9*n+24)/16
    for(n=4, 100, print(n, " ", a(n)))
    
  • Python
    def A376007(n):
        if (m:=n&7)==0 or m==4:
            return n*(n**2-4)+8>>3
        elif m==1 or m==7:
            return n*(n**2-9)+24>>4
        elif m==2 or m==6:
            return n**3>>3
        else:
            return n*(n**2-1)+8>>4 # Chai Wah Wu, Sep 27 2024

Formula

a(n) = A375336(n, A376005(n)).
a(n) = (n^3-4*n+8)/8 for n%4==0.
a(n) = (n^3-9*n+24)/16 for n%8==1 or n%8==7.
a(n) = (n^3)/8 for n%4==2.
a(n) = (n^3-n+8)/16 for n%8==3 or n%8==5.
From Chai Wah Wu, Sep 27 2024: (Start)
a(n) = 2*a(n-2) - a(n-4) + 2*a(n-8) - 4*a(n-10) + 2*a(n-12) - a(n-16) + 2*a(n-18) - a(n-20) for n > 23.
G.f.: x^4*(-2*x^19 - x^18 + 3*x^17 + x^16 - 2*x^15 + 2*x^14 + 4*x^13 + 2*x^12 + 7*x^11 + 20*x^10 - 3*x^9 + 8*x^8 + 18*x^7 + 30*x^6 + 12*x^5 + 14*x^4 + 3*x^3 + 13*x^2 + 8*x + 7)/((x - 1)^4*(x + 1)^4*(x^2 + 1)^2*(x^4 + 1)^2). (End)
Showing 1-4 of 4 results.