|
|
A045412
|
|
a(1)=3; for n > 1, a(n) = a(n-1) + 1 if n is already in the sequence, a(n) = a(n-1) + 3 otherwise.
|
|
4
|
|
|
3, 6, 7, 10, 13, 14, 15, 18, 21, 22, 25, 28, 29, 30, 31, 34, 37, 38, 41, 44, 45, 46, 49, 52, 53, 56, 59, 60, 61, 62, 63, 66, 69, 70, 73, 76, 77, 78, 81, 84, 85, 88, 91, 92, 93, 94, 97, 100, 101, 104, 107, 108, 109, 112, 115, 116, 119, 122, 123, 124, 125, 126
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MATHEMATICA
|
l={3}; a=3; For[n=2, n<=100, If[MemberQ[l, n], a=a+1, a=a+3]; AppendTo[l, a]; n++]; l (* Indranil Ghosh, Apr 07 2017 *)
|
|
PROG
|
(Python)
l=[3]
a=3
for n in range(2, 101):
if n not in l: a+=3
else: a+=1
l.append(a)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|