Michael De Vlieger, <a href="/A364628/b364628_1.txt">Table of n, a(n) for n = 1..16807</a>
Michael De Vlieger, <a href="/A364628/b364628_1.txt">Table of n, a(n) for n = 1..16807</a>
proposed
approved
editing
proposed
allocated For p = 7 and n > 0, write n = p^m + k, m >= 0, with maximal p^m <= n, with 0 <= k < p^(m+1) - p^m, then for n such that k=0, a(n)=n, and for Michael De Vliegern such that k > 0, a(n) is the smallest q*a(k), prime q != p, that is not already a term.
1, 2, 4, 8, 16, 32, 7, 3, 6, 12, 24, 48, 64, 14, 9, 18, 36, 72, 96, 128, 28, 27, 54, 108, 144, 192, 256, 56, 81, 162, 216, 288, 384, 512, 112, 243, 324, 432, 576, 768, 1024, 224, 486, 648, 864, 1152, 1536, 2048, 49, 5, 10, 20, 40, 80, 160, 21, 15, 30, 60, 120
1,2
This is sequence D(p), p = 7, where the Doudna sequence A005940 is D(2).
Michael De Vlieger, <a href="/A364628/b364628_1.txt">Table of n, a(n) for n = 1..16807</a>
<a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
p = 7; nn = 343; c[_] = False;
Do[Set[{m, k}, {1, n - p^Floor[Log[p, n]]}];
If[k == 0,
Set[{a[n], c[n]}, {n, True}],
While[Set[t, Prime[m] a[k]]; Or[m == i, c[t]], m++];
Set[{a[n], c[t]}, {t, True}]], {n, nn}];
Array[a, nn]
allocated
nonn
Michael De Vlieger, Sep 16 2023
approved
editing
allocated for Michael De Vlieger
recycled
allocated
reviewed
approved
proposed
reviewed
editing
proposed
a(n)=3*n^3-n+1
3, 23, 79, 189, 371, 643, 1023, 1529, 2179, 2991, 3983, 5173, 6579, 8219, 10111, 12273, 14723, 17479, 20559, 23981, 27763, 31923, 36479, 41449, 46851, 52703, 59023, 65829, 73139, 80971, 89343, 98273, 107779, 117879, 128591, 139933, 151923, 164579, 177919
1,1
a(n) is always congruent to 1,3 or 9 mod 10.
a(n)=3*n^3-n+1
For n=7, a(7)=3*7^3-7+1=1023
Table[3*Power[n, 3] - n + 1, {n, 0, 50}]
(Python)
for n in range(50):
n=n+1
print(str(3*n**3-n+1))
nonn,changed
recycled
Bairav Murugan, Aug 24 2023
proposed
editing