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-10 of 237 results. Next

A155560 Intersection of A000404 and A092572: N = a^2 + b^2 = c^2 + 3d^2 with a,b,c,d>0.

Original entry on oeis.org

13, 37, 52, 61, 73, 97, 100, 109, 117, 148, 157, 169, 181, 193, 208, 229, 241, 244, 277, 292, 313, 325, 333, 337, 349, 373, 388, 397, 400, 409, 421, 433, 436, 457, 468, 481, 541, 549, 577, 592, 601, 613, 628, 637, 657, 661, 673, 676, 709, 724, 733, 757, 769
Offset: 1

Views

Author

M. F. Hasler, Jan 24 2009

Keywords

Comments

Nonsquare terms of A155563. - Joerg Arndt, Jan 11 2015

Examples

			a(1)=13 is the least number that can be written as A+B and C+3D where A,B,C,D are positive squares (namely 13 = 2^2 + 3^2 = 1^2 + 3*2^2).
a(2)=37 is the second smallest number which figures in A000404 and in A092572 as well.
		

Programs

  • PARI
    isA155560(n /* omit optional 2nd arg for the present sequence */, c=[3,1]) = { for(i=1,#c,for(b=1,sqrtint((n-1)\c[i]),issquare(n-c[i]*b^2)&next(2));return);1}
    for( n=1,10^3, isA155560(n) & print1(n","))
    
  • PARI
    is(n)=!issquare(n) && #bnfisintnorm(bnfinit(z^2+z+1), n) && #bnfisintnorm(bnfinit(z^2+1), n);
    select(n->is(n), vector(1500,j,j)) \\ Joerg Arndt, Jan 11 2015

A135786 a(n) = A000404(n)^4.

Original entry on oeis.org

16, 625, 4096, 10000, 28561, 83521, 104976, 160000, 390625, 456976, 707281, 1048576, 1336336, 1874161, 2560000, 2825761, 4100625, 6250000, 7311616, 7890481, 11316496, 13845841, 17850625, 21381376, 26873856, 28398241, 29986576
Offset: 1

Views

Author

Artur Jasinski, Nov 29 2007

Keywords

Crossrefs

Programs

  • Mathematica
    nMax = 100; p := Floor[Sqrt[nMax - 1]]; Union[Flatten[Table[a^2 + b^2, {a, p}, {b, a, Floor[Sqrt[nMax - a^2]]}]]]^4 (* G. C. Greubel, Nov 09 2016 *)

Extensions

Definition corrected by Zak Seidov, Aug 05 2009

A155578 Intersection of A000404 and A155717: N = a^2 + b^2 = c^2 + 7*d^2 for some positive integers a,b,c,d.

Original entry on oeis.org

8, 29, 32, 37, 53, 72, 109, 113, 116, 128, 137, 148, 149, 193, 197, 200, 212, 232, 233, 261, 277, 281, 288, 296, 317, 333, 337, 373, 389, 392, 400, 401, 421, 424, 436, 449, 452, 457, 464, 477, 512, 541, 548, 557, 569, 592, 596, 613, 617, 641, 648, 653, 673
Offset: 1

Views

Author

M. F. Hasler, Jan 25 2009

Keywords

Comments

Subsequence of A155568 (where a,b,c,d may be zero).

Crossrefs

Programs

  • PARI
    isA155578(n,/* optional 2nd arg allows us to get other sequences */c=[7,1]) = { for(i=1,#c, for(b=1,sqrtint((n-1)\c[i]), issquare(n-c[i]*b^2) & next(2)); return);1}
    for( n=1,999, isA155578(n) & print1(n","))
    
  • Python
    from math import isqrt
    def aupto(limit):
        cands = range(1, isqrt(limit)+1)
        left =  set(a**2 +   b**2 for a in cands for b in cands)
        right = set(c**2 + 7*d**2 for c in cands for d in cands)
        return sorted(k for k in left & right if k <= limit)
    print(aupto(673)) # Michael S. Branicky, Aug 29 2021

A135787 a(n) = A000404(n)^5.

Original entry on oeis.org

32, 3125, 32768, 100000, 371293, 1419857, 1889568, 3200000, 9765625, 11881376, 20511149, 33554432, 45435424, 69343957, 102400000, 115856201, 184528125, 312500000, 380204032, 418195493, 656356768, 844596301, 1160290625
Offset: 1

Views

Author

Artur Jasinski, Nov 29 2007

Keywords

Crossrefs

Programs

  • Mathematica
    nMax = 100; p := Floor[Sqrt[nMax - 1]]; Union[Flatten[Table[a^2 + b^2, {a, p}, {b, a, Floor[Sqrt[nMax - a^2]]}]]]^5 (* G. C. Greubel, Nov 09 2016 *)

A135784 a(n) = A000404(n)^2.

Original entry on oeis.org

4, 25, 64, 100, 169, 289, 324, 400, 625, 676, 841, 1024, 1156, 1369, 1600, 1681, 2025, 2500, 2704, 2809, 3364, 3721, 4225, 4624, 5184, 5329, 5476, 6400, 6724, 7225, 7921, 8100, 9409, 9604, 10000, 10201, 10816, 11236, 11881, 12769, 13456, 13689, 14884
Offset: 1

Views

Author

Artur Jasinski, Nov 29 2007

Keywords

Crossrefs

Programs

  • Mathematica
    nMax = 100; p := Floor[Sqrt[nMax - 1]]; Union[Flatten[Table[a^2 + b^2, {a, p}, {b, a, Floor[Sqrt[nMax - a^2]]}]]]^2 (* G. C. Greubel, Nov 09 2016 *)

A135788 a(n) = A000404(n)^6.

Original entry on oeis.org

64, 15625, 262144, 1000000, 4826809, 24137569, 34012224, 64000000, 244140625, 308915776, 594823321, 1073741824, 1544804416, 2565726409, 4096000000, 4750104241, 8303765625, 15625000000, 19770609664, 22164361129, 38068692544
Offset: 1

Views

Author

Artur Jasinski, Nov 29 2007

Keywords

Crossrefs

Programs

  • Mathematica
    nMax = 100; p := Floor[Sqrt[nMax - 1]]; Union[Flatten[Table[a^2 + b^2, {a, p}, {b, a, Floor[Sqrt[nMax - a^2]]}]]]^6 (* G. C. Greubel, Nov 09 2016 *)

A024517 Position of 2*n^2 in A000404 (sums of 2 nonzero squares).

Original entry on oeis.org

1, 3, 7, 12, 18, 25, 34, 45, 56, 68, 82, 95, 112, 128, 146, 164, 183, 205, 227, 250, 275, 300, 325, 350, 382, 410, 440, 470, 503, 536, 569, 605, 642, 678, 717, 752, 794, 837, 878, 918, 963, 1007, 1054, 1101, 1147, 1196, 1246, 1293, 1348, 1401, 1452, 1506
Offset: 1

Views

Author

Keywords

Programs

  • PARI
    i=0;for(n=1,1000000,f=factor(n);r=0;b=0;t=0;for(k=1,#f[,1],if(f[k,1]%4==1,r++,if(f[k,1]%4==3,b+=(f[k,2]%2),t=(f[k,2]%2)))); if(b==0 && (r>0 || t==1), i++; if(issquare(n/2),print1(i",")))) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), Mar 03 2008

Extensions

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Mar 03 2008

A355237 First occurrence of difference n between two consecutive terms of A000404. a(n) gives the lower term. The upper term is A355238.

Original entry on oeis.org

17, 8, 2, 13, 20, 74, 90, 137, 377, 3050, 986, 1669, 4181, 6530, 1493, 8434, 9704, 22160, 10709, 5165, 16109, 154708, 58418, 31657, 52393, 401480, 176810, 101349, 105572, 678356, 241882, 501716, 393817, 284002, 685541, 1437353, 1751296, 3225578, 3439258, 2479594
Offset: 1

Views

Author

Hugo Pfoertner, Jun 30 2022

Keywords

Crossrefs

Programs

  • Python
    from itertools import count
    from sympy import factorint
    def A355237(n):
        m = 2
        for k in count(2):
            c = False
            for p in (f:=factorint(k)):
                if (q:= p & 3)==3 and f[p]&1:
                    break
                elif q == 1:
                    c = True
            else:
                if c or f.get(2,0)&1:
                    if k-m == n:
                        return m
                    m = k # Chai Wah Wu, Jul 01 2022

Formula

a(n) = A355238(n) - n.

A355238 First occurrence of difference n between two consecutive terms of A000404. a(n) gives the upper term. The lower term is A355237.

Original entry on oeis.org

18, 10, 5, 17, 25, 80, 97, 145, 386, 3060, 997, 1681, 4194, 6544, 1508, 8450, 9721, 22178, 10728, 5185, 16130, 154730, 58441, 31681, 52418, 401506, 176837, 101377, 105601, 678386, 241913, 501748, 393850, 284036, 685576, 1437389, 1751333, 3225616, 3439297, 2479634
Offset: 1

Views

Author

Hugo Pfoertner, Jun 30 2022

Keywords

Crossrefs

Programs

  • Python
    from itertools import count
    from sympy import factorint
    def A355238(n):
        m = 2
        for k in count(2):
            c = False
            for p in (f:=factorint(k)):
                if (q:= p & 3)==3 and f[p]&1:
                    break
                elif q == 1:
                    c = True
            else:
                if c or f.get(2,0)&1:
                    if k-m == n:
                        return k
                    m = k # Chai Wah Wu, Jul 01 2022

Formula

a(n) = A355237(n) + n.

A155561 Intersection of A000404 and A154777: N = a^2 + b^2 = c^2 + 2d^2 with a,b,c,d>0.

Original entry on oeis.org

17, 18, 34, 41, 68, 72, 73, 82, 89, 97, 113, 136, 137, 146, 153, 162, 164, 178, 193, 194, 225, 226, 233, 241, 242, 257, 272, 274, 281, 288, 289, 292, 306, 313, 328, 337, 353, 356, 369, 386, 388, 401, 409, 425, 433, 449, 450, 452, 457, 466, 482, 514, 521, 544
Offset: 1

Views

Author

M. F. Hasler, Jan 24 2009

Keywords

Examples

			a(1)=17 is the least number that can be written as A+B and C+2D where A,B,C,D are positive squares (namely 17 = 1^2 + 4^2 = 3^2 + 2*2^2).
a(2)=18 is the second smallest number which figures in A000404 and in A154777 as well.
		

Programs

  • PARI
    isA155561(n,/* use optional 2nd arg to get other analogous sequences */c=[2,1]) = { for( i=1,#c, for( b=1,sqrtint((n-1)\c[i]), issquare(n-c[i]*b^2) & next(2)); return);1}
    for( n=1,10^3, isA155561(n) & print1(n","))
Showing 1-10 of 237 results. Next