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-2 of 2 results.

A045897 Has both a primitive and imprimitive representation as x^2 + xy + y^2.

Original entry on oeis.org

49, 147, 169, 343, 361, 507, 637, 931, 961, 1029, 1083, 1183, 1369, 1519, 1813, 1849, 1911, 2107, 2197, 2401, 2527, 2793, 2883, 2989, 3211, 3283, 3549, 3577, 3721, 3871, 4107, 4459, 4489, 4557, 4693, 4753, 5047, 5239, 5329, 5341, 5439, 5547, 6223, 6241
Offset: 1

Views

Author

Keywords

Examples

			49 = 7^2 = 5^2 + 5*3 + 3^2.
		

Crossrefs

Intersection of A034017 and A034019.

Programs

  • PARI
    is(n)=my(f=factor(n), t); for(i=1, #f~, if(f[i, 1]%3!=1 && (f[i, 1]!=3 || f[i, 2]>1), return(0)); if(f[i, 1]%3<2 && f[i, 2]>1, t=1); if(f[i, 1]%3==2, if(f[i, 2]%2, return(0), t=1))); t \\ Charles R Greathouse IV, Nov 04 2015

Extensions

Extended by Ray Chandler, Jan 29 2009

A034022 Numbers that are primitively or imprimitively represented by x^2+xy+y^2, but not both.

Original entry on oeis.org

0, 1, 3, 4, 7, 9, 12, 13, 16, 19, 21, 25, 27, 28, 31, 36, 37, 39, 43, 48, 52, 57, 61, 63, 64, 67, 73, 75, 76, 79, 81, 84, 91, 93, 97, 100, 103, 108, 109, 111, 112, 117, 121, 124, 127, 129, 133, 139, 144, 148, 151, 156, 157, 163, 171, 172, 175, 181, 183, 189, 192, 193, 196, 199, 201, 208, 211, 217, 219, 223, 225
Offset: 1

Views

Author

Keywords

Comments

a(n) = A198772(n) for n <= 32. - Reinhard Zumkeller, Oct 30 2011

Crossrefs

Symmetric difference of A034017 and A034019.
After the initial 0, differs from A329963 next time at a(63) = 196, term which is not present in the latter.

Programs

  • PARI
    prim(f)=for(i=1, #f~, if(f[i, 1]%3!=1 && (f[i, 1]!=3 || f[i, 2]>1), return(factorback(f)==0))); 1
    imprim(f)=my(t); for(i=1, #f~, if(f[i, 1]%3<2 && f[i, 2]>1, t=1); if(f[i, 1]%3==2, if(f[i, 2]%2, return(0), t=1))); t
    is(n)=my(f=factor(n)); prim(f)+imprim(f)==1 \\ Charles R Greathouse IV, Nov 04 2015

Extensions

Extended by Ray Chandler, Jan 29 2009
Data section further extended up to a(71), to better differentiate from nearby sequences, by Antti Karttunen, Jul 04 2024
Showing 1-2 of 2 results.