A106856 Primes of the form x^2 + xy + 2y^2, with x and y nonnegative.
2, 11, 23, 37, 43, 53, 71, 79, 107, 109, 127, 137, 149, 151, 163, 193, 197, 211, 233, 239, 263, 281, 317, 331, 337, 373, 389, 401, 421, 431, 443, 463, 487, 491, 499, 541, 547, 557, 569, 599, 613, 617, 641, 653, 659, 673, 683, 739, 743, 751, 757, 809, 821
Offset: 1
A028929 Numbers represented by quadratic form with Gram matrix [ 4, 1; 1, 6 ], divided by 2.
0, 2, 3, 4, 6, 8, 9, 12, 13, 16, 18, 24, 26, 27, 29, 31, 32, 36, 39, 41, 46, 47, 48, 50, 52, 54, 58, 62, 64, 69, 71, 72, 73, 75, 78, 81, 82, 87, 92, 93, 94, 96, 98, 100, 104, 108, 116, 117, 118, 123, 124, 127, 128, 131, 138, 139, 141, 142, 144, 146, 147, 150, 151, 156
Offset: 1
Comments
Nonnegative integers of the form 2x^2 + x*y + 3y^2, a positive definite quadratic form of discriminant -23. - N. J. A. Sloane, Jul 09 2014
Links
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Extensions
Corrected and extended by Larry Reeves (larryr(AT)acm.org), Mar 29 2000
A104217 Period of Perrin (0,2,3,2,5,5,..., A001608) sequence mod n.
1, 7, 13, 14, 24, 91, 48, 28, 39, 168, 120, 182, 183, 336, 312, 56, 288, 273, 180, 168, 624, 840, 22, 364, 120, 1281, 117, 336, 871, 2184, 993, 112, 1560, 2016, 48, 546, 1368, 1260, 2379, 168, 1723, 4368, 231, 840, 312, 154, 2257, 728, 336, 840, 3744, 2562
Offset: 1
Keywords
Comments
Links
- T. D. Noe, Table of n, a(n) for n=1..1000
Programs
-
Mathematica
Table[a={0,2,3}; a=a0=Mod[a, n]; k=0; While[k++; s=a[[2]]+a[[1]]; a=RotateLeft[a]; a[[ -1]]=Mod[s,n]; a!=a0]; k, {n,100}] (* T. D. Noe, Oct 10 2006 *)
-
Python
from math import lcm from functools import lru_cache from sympy import factorint @lru_cache(maxsize=None) def A104217(n): if n < 4: return (1,7,13)[n-1] f = factorint(n).items() if len(f) > 1: return lcm(*(A104217(a**b) for a,b in f)) else: k,x = 1, (0,2,3) while x != (3,0,2): k += 1 x = (x[1], x[2], (x[0]+x[1]) % n) return k # Chai Wah Wu, Apr 25 2025
Extensions
More terms from T. D. Noe, Oct 10 2006
A028958 Numbers represented by quadratic form with Gram matrix [ 2, 1; 1, 12 ] (divided by 2).
0, 1, 4, 6, 8, 9, 12, 16, 18, 23, 24, 25, 26, 27, 32, 36, 39, 48, 49, 52, 54, 58, 59, 62, 64, 72, 78, 81, 82, 87, 92, 93, 94, 96, 100, 101, 104, 108, 116, 117, 121, 123, 124, 128, 138, 141, 142, 144, 146, 150, 156, 162, 164, 167, 169, 173, 174, 184, 186, 188, 192
Offset: 1
Keywords
Comments
Nonnegative integers of the form x^2 + x*y + 6*y^2, discriminant -23. - Ray Chandler, Jul 12 2014
The Gram matrix is positive-definite, therefore, if w := (1 + sqrt(-23)) / 2, then |x + w*y|^2 = x^2 + x*y + 6*y^2 > 0 for all integers x and y except x = y = 0. - Michael Somos, Mar 28 2015
The theta function of the lattice with basis [1, w] is the g.f. of A028959, therefore, A028959(n) is positive if and only if n is in this sequence. - Michael Somos, Mar 28 2015
Links
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), Mar 29 2000
A309138 Nonnegative integers of the form x^2 + 23*y^2.
0, 1, 4, 9, 16, 23, 24, 25, 27, 32, 36, 39, 48, 49, 59, 64, 72, 81, 87, 92, 93, 96, 100, 101, 104, 108, 117, 121, 123, 128, 141, 144, 156, 167, 169, 173, 192, 196, 207, 208, 211, 213, 216, 219, 223, 225, 232, 236, 243, 248, 256, 261, 271, 279, 288, 289, 307, 312
Offset: 1
Keywords
Comments
Discriminant of positive definite binary quadratic form: -92.
Links
- Peter Luschny, Binary Quadratic Forms
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Comments
References
Links
Crossrefs
Programs
Mathematica
PARI
Extensions