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 31-40 of 40 results.

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

Views

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

A357995 Frobenius number for A = (n, n+1^2, n+2^2, n+3^2, ...) for n>=2.

Original entry on oeis.org

1, 5, 11, 13, 11, 20, 31, 24, 27, 29, 43, 37, 49, 52, 63, 58, 69, 53, 75, 61, 65, 84, 95, 98, 85, 96, 107, 115, 88, 121, 127, 122, 130, 136, 139, 134, 145, 148, 159, 151, 154, 157, 171, 174, 169, 180, 191, 194, 178, 181, 203, 198, 201, 212, 223, 210, 221, 232, 235, 214
Offset: 2

Views

Author

Michel Marcus, Oct 23 2022

Keywords

Crossrefs

Programs

  • Python
    def A357995(n):
        a, b = set([0]), set(range(1,n**2))
        for m in [n+k**2 for k in range(n+1)]:
            d=m
            while d < n**2:
                c2 = set([x for x in b if x-d in a])
                a |= c2 ; b -= c2 ; d*=2
        return max(b) # Bert Dobbelaere, Oct 30 2022

Extensions

More terms from Bert Dobbelaere, Oct 30 2022

A373710 Triangle read by rows: T(n,k) is the area of the square whose vertices divide the sides n of a circumscribed square into integer sections k and n - k, 0 <= k <= floor(n/2).

Original entry on oeis.org

0, 1, 4, 2, 9, 5, 16, 10, 8, 25, 17, 13, 36, 26, 20, 18, 49, 37, 29, 25, 64, 50, 40, 34, 32, 81, 65, 53, 45, 41, 100, 82, 68, 58, 52, 50, 121, 101, 85, 73, 65, 61, 144, 122, 104, 90, 80, 74, 72, 169, 145, 125, 109, 97, 89, 85, 196, 170, 148, 130, 116, 106, 100, 98
Offset: 0

Views

Author

Felix Huber, Jun 17 2024

Keywords

Comments

For a sketch see linked illustration "Square in square".

Examples

			Triangle T(n,k) begins:
   n\k   0     1     2     3     4     5     6     7   ...
   0     0
   1     1
   2     4     2
   3     9     5
   4    16    10     8
   5    25    17    13
   6    36    26    20    18
   7    49    37    29    25
   8    64    50    40    34    32
   9    81    65    53    45    41
  10   100    82    68    58    52    50
  11   121   101    85    73    65    61
  12   144   122   104    90    80    74    72
  13   169   145   125   109    97    89    85
  14   196   170   148   130   116   106   100    98
  ...
		

Crossrefs

Cf. A000290(first column), A005563 (second column), A048147 (rows: first half of each diagonal there), A087475 (third column), A189834 (fourth column), A241751 (fifth column).

Programs

  • Maple
    A373710:=(n,k)->n^2+2*k^2-2*n*k;
    seq(seq(A373710(n,k),k=0..floor(n/2)),n=0..14);

Formula

T(n,k) = n^2 + 2*k^2 - 2*n*k, 0 <= k <= floor(n/2).
Sequence of row n = r: a(i) = 2*i^2 - 4*i - 2*r*i + r^2 + 2*r + 2, 1 <= i <= floor(r/2 + 1).
Sequence of column k = c: a(j) = j^2 - 2*j + 2*c*j + 2*c^2 - 2*c + 1, j >= 1.

A089146 Greatest common divisor of n^2 - 4 and n^2 + 4.

Original entry on oeis.org

4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4, 1, 8, 1, 4
Offset: 0

Views

Author

Cino Hilliard, Dec 05 2003

Keywords

Comments

Also decimal expansion of 4181/9999 = 0.418141814181...
Repeat [4,1,8,1], because for odd n, the GCD is 1; for n = 4k+2, GCD(16(k^2+k), 16(k^2+k)+8) = 8; for n = 4k, (16k^2-4,16k^2+4) can be divided by 4, but then GCD(4k^2-1,4k^2+1) = 1. - Georg Fischer, Jul 21 2022

Crossrefs

Programs

  • Mathematica
    a[n_] := GCD[n^2 - 4, n^2 + 4]; Array[a, 101, 0] (* Amiram Eldar, Dec 31 2022 *)
  • PARI
    g(n) = for(x=0,n,print1(gcd(x^2-4,x^2+4)","))

Formula

Multiplicative with a(2) = 8, a(2^e) = 4 if e >= 2, a(p^e) = 1 otherwise. - David W. Wilson, Jun 12 2005
Dirichlet g.f.: zeta(s)*(1+7/2^s-4^(1-s)). - Amiram Eldar, Dec 31 2022
Sum_{k=1..n} a(k) ~ 7*n/2. - Vaclav Kotesovec, Dec 31 2022

A211191 List of odd values of k for which k^2+4 has a factor that is a square number larger than 1.

Original entry on oeis.org

11, 29, 39, 61, 89, 111, 139, 161, 189, 199, 211, 213, 239, 261, 289, 309, 311, 339, 361, 365, 367, 389, 393, 411, 439, 461, 489, 511, 521, 539, 561, 589, 611, 639, 647, 661, 689, 705, 711, 739, 759, 761, 789, 791, 811, 839, 861, 889, 911, 923, 925, 939, 943, 961, 985, 989
Offset: 1

Views

Author

Ruskin Harding, Feb 03 2013

Keywords

Comments

Or, (odd integers n such that) n^2 + 4 is not squarefree. - Zak Seidov, Feb 03 2013

Examples

			The first odd value of k for which k^2+4 has a square factor is 11: 11^2+4 = 125 = 5^2*5.
		

Crossrefs

Programs

  • Magma
    [k: k in [1..1000 by 2] | not IsSquarefree(k^2+4)]; // Bruno Berselli, Feb 06 2013
  • Mathematica
    Select[Range[11, 1000, 2], ! SquareFreeQ[#^2 + 4] &] (* Zak Seidov, Feb 03 2013 *)
  • PARI
    is_term(n) = !issquarefree(n^2+4);
    forstep (n=1,10^3,2, if (is_term(n), print1(n,", ")));
    /* Joerg Arndt, Feb 05 2013 */
    
  • Python
    b=1
    x=1
    for i in range(1, 100000, 2):
        for j in range(2, i):
           if ((i**2)+4)%(j**2)==0:
              a=i
              if a!=b:
                 b=a
                 print(x, i)
                 x=x+1
    

A214870 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 counterclockwise. T(n,k) read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Mar 11 2013

Keywords

Comments

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) 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(n,2), T(n,4), ... T(4,n), T(2,n);
. . .

Examples

			The start of the sequence as table:
   1   2   5  10  17  26 ...
   3   4   9  16  25  36 ...
   7   8   6  11  18  27 ...
  13  14  12  15  24  35 ...
  21  22  20  23  19  28 ...
  31  32  30  33  29  34 ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   2,  3;
   5,  4,  7;
  10,  9,  8, 13;
  17, 16,  6, 14, 21;
  26, 25, 11, 12, 22, 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-i+(j%2)*(2-(j+1)/2)+((j+1)%2)*(j/2+1)
    else:
       result=j*j-2*(i%2)*j + (i%2)*((i+1)/2+1) + ((i+1)%2)*(-i/2+1)

Formula

As table
T(n,k) = k*k-2*(n mod 2)*k+(n mod 2)*((n+1)/2+1)+((n+1) mod 2)*(-n/2+1), if n<=k;
T(n,k) = n*n-n+(k mod 2)*(2-(k+1)/2)+((k+1) mod 2)*(k/2+1), if n>k.
As linear sequence
a(n) = j*j-2*(i mod 2)*j+(i mod 2)*((i+1)/2+1)+((i+1) mod 2)*(-i/2+1), if i<=j;
a(n) = i*i-i+(j mod 2)*(2-(j+1)/2)+((j+1) mod 2)*(j/2+1), 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).

A214871 Natural numbers placed in table T(n,k) layer by layer. The order of placement - T(n,n), T(1,n), T(n,1), T(2,n), T(n,2),...T(n-1,n), T(n,n-1). Table T(n,k) read by antidiagonals.

Original entry on oeis.org

1, 3, 4, 6, 2, 7, 11, 8, 9, 12, 18, 13, 5, 14, 19, 27, 20, 15, 16, 21, 28, 38, 29, 22, 10, 23, 30, 39, 51, 40, 31, 24, 25, 32, 41, 52, 66, 53, 42, 33, 17, 34, 43, 54, 67, 83, 68, 55, 44, 35, 36, 45, 56, 69, 84, 102, 85, 70, 57, 46, 26, 47, 58, 71, 86, 103, 123
Offset: 1

Views

Author

Boris Putievskiy, Mar 11 2013

Keywords

Comments

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) layer by layer. The order of the list:
T(1,1)=1;
T(2,2), T(1,2), T(2,1);
. . .
T(n,n), T(1,n), T(n,1), T(2,n), T(n,2),...T(n-1,n), T(n,n-1);
. . .

Examples

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

Crossrefs

Cf. A060734, A060736, A185725, A213921, A213922; table T(n,k) contains: in rows A059100, A087475, A114949, A189833, A114948, A114962; in columns A117950, A117951, A117619, A189834, A189836; the main diagonal is A002522.

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-1)**2+1
    if i > j:
       result=(i-1)**2+2*j+1
    if i < j:
       result=(j-1)**2+2*i

Formula

As table
T(n,k) = (n-1)^2+1, if n=k;
T(n,k) = (n-1)^2+2*k+1, if n>k;
T(n,k) = (k-1)^2+2*n, if n
As linear sequence
a(n) = (i-1)^2+1, if i=j;
a(n) = (i-1)^2+2*j+1, if i>j;
a(n) = (j-1)^2+2*i, 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).

A308464 Squarefree numbers of the form m^2 + 4.

Original entry on oeis.org

5, 13, 29, 53, 85, 173, 229, 293, 365, 445, 533, 629, 733, 965, 1093, 1229, 1373, 1685, 1853, 2029, 2213, 2405, 2605, 2813, 3029, 3253, 3485, 3973, 4229, 4493, 4765, 5045, 5333, 5629, 5933, 6245, 6565, 6893, 7229, 7573, 8285, 8653, 9029, 9413, 9805
Offset: 1

Author

Alonso del Arte, May 29 2019

Keywords

Comments

Yokoi's conjecture posits that, except for most of the values less than 365, the ring of algebraic integers of Q(sqrt(a(n))) has class number greater than 1. Only one counterexample to this conjecture may exist, and it would also be a counterexample to the generalized Riemann hypothesis, according to Mollin (1996).
All terms == 5 (mod 8). - Robert Israel, Jun 05 2019

References

  • Richard A. Mollin, Quadratics. Boca Raton, Florida: CRC Press (1996): 176 - 177.

Crossrefs

Cf. A078370, A087475 (supersequences).

Programs

  • Maple
    select(numtheory:-issqrfree,[seq(m^2+4,m=1..1000,2)]); # Robert Israel, Jun 05 2019
  • Mathematica
    Select[(2Range[50] - 1)^2 + 4, MoebiusMu[#] != 0 &]
    Select[Table[i^2 + 4, {i, 1, 100}], SquareFreeQ] (* Navvye Anand, Jun 20 2024 *)
  • PARI
    is(n) = issquarefree(n) && issquare(n-4) \\ Felix Fröhlich, May 29 2019

A360741 Semiprimes of the form k^2 + 4.

Original entry on oeis.org

4, 85, 365, 445, 533, 629, 965, 1685, 1853, 2605, 2813, 3029, 3973, 4765, 5045, 5629, 5933, 6245, 6893, 8285, 8653, 11029, 11453, 11885, 12773, 14165, 15133, 16645, 17165, 17693, 20453, 21029, 22205, 22805, 23413, 24653, 27229, 29245, 29933, 30629, 32765, 34229
Offset: 1

Author

Elmo R. Oliveira, Feb 18 2023

Keywords

Comments

A242332 gives the corresponding values of k.
Except for 4, all terms == 5 (mod 8). - Robert Israel, Feb 18 2023

Examples

			85 is a term because 9^2 + 4 = 85 = 5*17.
		

Programs

  • Maple
    select(t -> numtheory:-bigomega(t)=2, [seq(i^2+4,i=0..1000)]); # Robert Israel, Feb 18 2023
  • Mathematica
    Select[Range[0, 200]^2 + 4, PrimeOmega[#] == 2 &] (* Amiram Eldar, Feb 18 2023 *)

Formula

a(n) = A242332(n)^2 + 4.

A190780 a(n) = 2*(n^8 + 224*n^4 + 256)^2.

Original entry on oeis.org

131072, 462722, 33554432, 1246103042, 30324948992, 563669272322, 7763186941952, 79452617800322, 626224351281152, 3963462651845762, 20906139893891072, 94733225757031682, 377800938372595712, 1351791004705013762, 4406854039510188032, 13253329257388072322
Offset: 0

Author

Rafael Parra Machio, May 19 2011

Keywords

Comments

Each term equals the sum of three eighth powers and also twice a perfect square: a(n)= 2*(n^8+14n^4*2^4+2^8)^2.
More generally, a(n,k) = 2*(n^8+14*n^4*k^4+k^8)^2 = x^8+y^8+z^8, where x=n^2-k^2; y=n^2+k^2; z=2*n*k.

Examples

			462722 = 3^8+5^8+4^8 = 2*481^2.
563669272322 = 21^8+29^8+20^8 = 2*481^2.
Triplets (x,y,z) for k=2: {-3,5,4}, {0,8,8}, {5,13,12}, {12,20,16}, {21,29,20}, {32,40,24}, {45,53,28}, {60, 68,32}, {77,85,36},
{96,104,40}, see A028347 for x, A087475 for y, A008586 for z.
		

References

  • Robert Carmichael, Diophantine Analysis, Ed. 1915 by Mathematical Monographs, pages 96

Programs

  • Mathematica
    Table[2(m^8+14m^4n^4+n^8)^2,{m,1,10}]/. n -> 2
    Table[(m^2-n^2)^8+(m^2+n^2)^8+(2*m*n), {m, 1, 10}]/. n -> 2
    Table[{(m^2-2^2), (m^2+2^2), (2*m*2)}, {m, 1, 5}], (* triples x, y, z *)
    Table[2(n^8+224n^4+256)^2,{n,0,20}] (* Harvey P. Dale, Jun 19 2011 *)
  • PARI
    a(n)=2*(n^4+4*n^3+8*n^2-16*n+16)^2*(n^4-4*n^3+8*n^2+16*n+16)^2 ; \\ Charles R Greathouse IV, May 19 2011

Formula

a(n) = 2*(n^8+14*n^4*2^4+2^8)^2.
G.f.: ( -131072 +1765502*x -43513950*x^2 -649478930*x^3 -13701900430*x^4 -195088344234*x^5 -1536270678326*x^6 -6277763482330*x^7 -12900117572550*x^8 -12896931212230*x^9 -6280312570586*x^10 -1534648531254*x^11 -195899417770*x^12 -13389949070*x^13 -738607890*x^14 -25688158*x^15 -462722*x^16 ) / (x-1)^17. - R. J. Mathar, Jun 04 2011

Extensions

More terms from Harvey P. Dale, Jun 29 2011
Previous Showing 31-40 of 40 results.