A304333 Number of positive integers k such that n - L(k) is a positive squarefree number, where L(k) denotes the k-th Lucas number A000204(k).
0, 1, 1, 2, 2, 3, 2, 3, 3, 3, 2, 3, 3, 5, 2, 3, 4, 5, 2, 4, 4, 4, 3, 5, 4, 4, 2, 3, 3, 5, 3, 5, 5, 5, 4, 4, 5, 4, 4, 6, 5, 6, 3, 6, 4, 5, 3, 6, 5, 6, 3, 5, 4, 5, 3, 3, 4, 6, 4, 6, 4, 7, 3, 6, 4, 6, 2, 6, 6, 6, 4, 5, 6, 4, 4, 6, 7, 6, 3, 7, 6, 6, 4, 6, 5, 7, 5, 6, 7, 8
Offset: 1
Keywords
Examples
a(2) = 1 with 2 - L(1) = 1 squarefree. a(3) = 1 with 3 - L(1) = 2 squarefree. a(67) = 2 with 67 - L(1) = 2*3*11 and 67 - L(7) = 2*19 both squarefree.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
- Zhi-Wei Sun, Mixed sums of primes and other terms, in: Additive Number Theory (edited by D. Chudnovsky and G. Chudnovsky), pp. 341-353, Springer, New York, 2010.
- Zhi-Wei Sun, Conjectures on representations involving primes, in: M. Nathanson (ed.), Combinatorial and Additive Number Theory II, Springer Proc. in Math. & Stat., Vol. 220, Springer, Cham, 2017, pp. 279-310. (See also arXiv:1211.1588 [math.NT], 2012-2017.)
Programs
-
Maple
a := proc(n) local count, lucas, newcas; count := 0; lucas := 1; newcas := 2; while lucas < n do if numtheory:-issqrfree(n - lucas) then count := count + 1 fi; lucas, newcas := lucas + newcas, lucas; od; count end: seq(a(n), n=1..90); # Peter Luschny, May 15 2018
-
Mathematica
f[n_]:=f[n]=LucasL[n]; tab={};Do[r=0;k=1;Label[bb];If[f[k]>=n,Goto[aa]];If[SquareFreeQ[n-f[k]],r=r+1];k=k+1;Goto[bb];Label[aa];tab=Append[tab,r],{n,1,90}];Print[tab]
-
PARI
A304333(n) = { my(u1=1,u2=3,old_u1,c=0); if(n<=2,n-1,while(u1
Antti Karttunen, May 13 2018
Comments