OFFSET
1,1
COMMENTS
Is this sequence infinite?
For any v > 0, let b_v be the variant of this sequence starting with v:
- b_4 = a (this sequence),
- for v in {1, 2, 3, 5}: b_v(n) = n for all n > 0 except a finite number.
This sequence is a variant of A318358.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..500
EXAMPLE
For n = 3:
- (4^3 + 1^3 + 2^3) == 3 mod (4 + 1 + 2),
- (4^3 + 1^3 + 3^3) == 4 mod (4 + 1 + 3),
- (4^3 + 1^3 + 5^3) == 0 mod (4 + 1 + 5),
- hence a(3) = 5.
PROG
(PARI) s=0; s3=0; p=0; v=4; for (n=1, 54, print1 (v ", "); s+=v; s3+=v^3; p+=2^v; for (w=1, oo, if (!bittest(p, w) && (s3+w^3)%(s+w)==0, v=w; break)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Aug 24 2018
STATUS
approved