# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/
Search: id:a001479
Showing 1-1 of 1
%I A001479 M0166 N0065 #40 Feb 07 2017 11:39:54
%S A001479 0,2,1,4,2,5,4,7,8,5,2,7,10,1,10,8,2,7,4,13,1,14,8,14,11,7,14,13,16,8,
%T A001479 11,16,17,7,2,19,4,17,19,11,1,14,5,10,22,16,4,23,20,8,23,13,10,5,16,
%U A001479 22,20,19,25,4,11,22,25,8,26,13,1,28,28,26,23,29,28
%N A001479 Let p = A007645(n) be the n-th generalized cuban prime and write p = x^2 + 3*y^2; a(n) = x.
%D A001479 A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
%D A001479 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A001479 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A001479 B. van der Pol and P. Speziali, The primes in k(rho). Nederl. Akad. Wetensch. Proc. Ser. A. {54} = Indagationes Math. 13, (1951). 9-15 (1 plate).
%H A001479 T. D. Noe, Table of n, a(n) for n = 1..1000
%H A001479 A. J. C. Cunningham, Quadratic Partitions, Hodgson, London, 1904 [Annotated scans of selected pages]
%H A001479 S. R. Finch, Powers of Euler's q-Series, (arXiv:math.NT/0701251).
%H A001479 B. van der Pol and P. Speziali, The primes in k(rho) (annotated and scanned copy)
%t A001479 nmax = 56; nextCuban[p_] := If[p1 = NextPrime[p]; Mod[p1, 3] > 1, nextCuban[p1], p1]; cubanPrimes = NestList[ nextCuban, 3, nmax ]; f[p_] := x /. ToRules[ Reduce[x > 0 && y > 0 && p == x^2 + 3*y^2, {x, y}, Integers]]; a[1] = 0; a[n_] := f[cubanPrimes[[n]]]; Table[ a[n] , {n, 1, nmax}] (* _Jean-François Alcover_, Oct 19 2011 *)
%o A001479 (Haskell)
%o A001479 a001479 n = a000196 $ head $
%o A001479 filter ((== 1) . a010052) $ map (a007645 n -) $ tail a033428_list
%o A001479 -- _Reinhard Zumkeller_, Jul 11 2013
%o A001479 (PARI) do(lim)=my(v=List(), q=Qfb(1,0,3)); forprime(p=2,lim, if(p%3==2,next); listput(v, qfbsolve(q,p)[1])); Vec(v) \\ _Charles R Greathouse IV_, Feb 07 2017
%Y A001479 Cf. A001480, A007645, A000196, A010052, A033428.
%K A001479 nonn,easy,nice
%O A001479 1,2
%A A001479 _N. J. A. Sloane_
%E A001479 Definition revised by _N. J. A. Sloane_, Jan 29 2013
# Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE