login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A290389 Inverse to A290308. 3

%I #15 Sep 09 2017 23:25:00

%S 1,2,4,8,16,32,64,128,256,512,3,1024,2048,4096,8192,16384,32768,65536,

%T 131072,262144,9,524288,1048576,2097152,4194304,8388608,16777216,

%U 33554432,67108864,134217728,27,268435456,536870912,1073741824,2147483648,4294967296

%N Inverse to A290308.

%C The sequence n -> a(n-1) (with n > 0) is an analog of A005940 for the decimal base.

%C a(A052382(k) * 10^(n-1)) = prime(n)^k for any n > 0 and k > 0 (where prime(n) is the n-th prime).

%H Rémy Sigrist, <a href="/A290389/b290389.txt">Table of n, a(n) for n = 0..2500</a>

%H Rémy Sigrist, <a href="/A290389/a290389.gp.txt">PARI program for A290389</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%e A290308(1) = 0, hence a(0) = 1.

%e A290308(2) = 1, hence a(1) = 2.

%e A290308(3) = 10, hence a(10) = 3.

%e A290308(4) = 2, hence a(2) = 4.

%e A290308(5) = 100, hence a(100) = 5.

%e A290308(6) = 101, hence a(101) = 6.

%e A290308(7) = 1000, hence a(1000) = 7.

%e A290308(8) = 3, hence a(3) = 8.

%e A290308(9) = 20, hence a(20) = 9.

%e A290308(10) = 1001, hence a(1001) = 10.

%t f[n_] := Function[m, Sum[(1 + Mod[Floor[(8 n + 1 - 9^m)/(8*9^j)], 9]) 10^j, {j, 0, m - 1}]]@ Floor@ Log[9, 8 n + 1]; Block[{nn = 35, s},s = Association@ Array[f@ # -> # &, nn]; {1}~Join~Table[Times @@ MapIndexed[Prime[First[#2]]^#1 &, If[DigitCount[n, 10, 0] > 0, Function[t, Reverse@ Flatten@ Apply[Join, {SplitBy[Take[Reverse@ t, Length@ t - Length@ #],0] /. z_List /; First@ z == 0 :> Most@ z, #}] &@ TakeWhile[t, # == 0 &]]@ Reverse@ IntegerDigits[n], {Lookup[s, n]}]], {n, nn}]] (* _Michael De Vlieger_, Jul 31 2017 *)

%o (PARI) See Links section.

%Y Cf. A005940, A290308.

%K nonn,base

%O 0,2

%A _Rémy Sigrist_, Jul 29 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:02 EDT 2024. Contains 371969 sequences. (Running on oeis4.)