A085940 After correction, duplicate of A061509.
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 2, 6, 18, 54, 162, 486, 1458, 4374, 13122, 39366, 4
Offset: 0
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
a(15)=96 because 3^1 * 2^5 = 3*32 = 96.
a054842 = f a000040_list 1 where f _ y 0 = y f (p:ps) y x = f ps (y * p ^ d) x' where (x', d) = divMod x 10 -- Reinhard Zumkeller, Aug 03 2015
A054842[n_] := Times @@ (Prime[Range[Length[#], 1, -1]]^#) & [IntegerDigits[n]]; Array[A054842, 100, 0] (* Paolo Xausa, Nov 25 2024 *)
a(n)= my(d=Vecrev(digits(n))); factorback(primes(#d), d); \\ Ruud H.G. van Tol, Nov 28 2024
a(12) = 2^2 * 3^1 = 12. a(231) = 2^3 * 3^2 * 5^1 = 360.
import Data.Char (digitToInt) import Data.List (findIndices) a189398 n = product $ zipWith (^) a000040_list (map digitToInt $ show n) -- Two computations of the Meertens number: the first is brute force, meertens = map succ $ findIndices (\x -> a189398 x == x) [1..] -- ... and the second is more efficient, from Bird reference, page 87: meertens' k = [n | (n,g) <- candidates (0,1), n == g] where candidates = concat . map (search pps) . tail . labels ps ps : pps = map (\p -> iterate (p *) 1) $ take k a000040_list search [] x = [x] search (ps:pps) x = x : concat (map (search pps) (labels ps x)) labels ps (n,g) = zip (map (10*n +) [0..9]) (chop $ map (g *) ps) chop = takeWhile (< 10^k) -- Time and space required, GHC interpreted, Mac OS X, 2.66 GHz: -- for >head meertens: (466.87 secs, 254780027728 bytes); -- for >meertens' 8: ( 0.28 secs, 62027124 bytes).
a:= n-> `if`(n=0, 1, ithprime(length(n))^irem(n, 10, 'm') *a(m)): seq(a(n), n=1..110); # Alois P. Heinz, May 04 2011
a[n_] := (p = Prime[Range[Length[d = IntegerDigits[n]]]]; Times @@ (p^d)); Array[a, 50] (* Jean-François Alcover, Jan 09 2016 *)
a(n)=my(d=digits(n),p=primes(#d)); prod(i=1,#d,p[i]^d[i]) \\ Charles R Greathouse IV, Aug 19 2014
from sympy import prime from operator import mul from functools import reduce def A189398(n): return reduce(mul, (prime(i)**int(d) for i,d in enumerate(str(n),start=1))) # Chai Wah Wu, Aug 31 2014
# implementation using recursion from sympy import prime def _A189398(n): nlen = len(n) return _A189398(n[:-1])*prime(nlen)**int(n[-1]) if nlen > 1 else 2**int(n) def A189398(n): return _A189398(str(n)) # Chai Wah Wu, Aug 31 2014
a(4) = 4^4 = 256. a(123) = 1^1 * 2^2 * 3^3 = 108. a(1024) = 1^1 * 2^2 * 4^4 = 1024.
a:= n-> mul(i^i,i=convert(n, base, 10)): seq(a(n), n=0..39); # Alois P. Heinz, Nov 26 2024
A061510[n_] := If[n == 0, 1, Times @@ (#^#) & [DeleteCases[IntegerDigits[n], 0]]]; Array[A061510, 50, 0] (* Paolo Xausa, Nov 26 2024 *)
a(n) = my(d=digits(n)); vecprod(vector(#d, k, d[k]^d[k])); \\ Michel Marcus, Nov 25 2024
from math import prod def a(n): return prod(d**d for d in map(int, str(n)) if d > 1) print([a(n) for n in range(40)]) # Michael S. Branicky, Nov 25 2024
Comments