cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A011262 In the prime factorization of n, increment odd powers and decrement even powers (multiplicative and self-inverse).

Original entry on oeis.org

1, 4, 9, 2, 25, 36, 49, 16, 3, 100, 121, 18, 169, 196, 225, 8, 289, 12, 361, 50, 441, 484, 529, 144, 5, 676, 81, 98, 841, 900, 961, 64, 1089, 1156, 1225, 6, 1369, 1444, 1521, 400, 1681, 1764, 1849, 242, 75, 2116, 2209, 72, 7, 20, 2601, 338, 2809, 324, 3025, 784, 3249
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a011262 n = product $ zipWith (^)
                          (a027748_row n) (map a103889 $ a124010_row n)
    -- Reinhard Zumkeller, Jun 23 2013
  • Mathematica
    f[n_, k_] := n^(If[EvenQ[k], k - 1, k + 1]); Table[Times @@ f @@@ FactorInteger[n], {n, 57}] (* Jayanta Basu, Aug 14 2013 *)
  • PARI
    a(n)=my(f=factor(n));return(prod(i=1,#f[,1],f[i,1]^(f[i,2]-(-1)^f[i,2]))) \\ Paul Tek, Jun 01 2013
    

Formula

Multiplicative with f(p^k) = p^(k-1) if k even, p^(k+1) if k odd.
a(n) = Product_{k = 1..A001221(n)} A027748(n,k) ^ A103889(A124010(n,k)). - Reinhard Zumkeller, Jun 23 2013
Sum_{k=1..n} a(k) ~ c * n^3, where c = (1/3) * Product_{p prime} ((p^5 + p^4 - p + 1)/(p^5 + p^4 + p^3 + p^2)) = 0.21311151701724196530... . - Amiram Eldar, Oct 13 2022

A227324 Result of changing both the prime indices and the exponents in the prime factorization of n: increment odd values, decrement even values.

Original entry on oeis.org

1, 9, 4, 3, 49, 36, 25, 81, 2, 441, 169, 12, 121, 225, 196, 27, 361, 18, 289, 147, 100, 1521, 841, 324, 7, 1089, 16, 75, 529, 1764, 1369, 729, 676, 3249, 1225, 6, 961, 2601, 484, 3969, 1849, 900, 1681, 507, 98, 7569, 2809, 108, 5, 63, 1444, 363, 2209, 144
Offset: 1

Views

Author

Alex Ratushnyak, Jul 07 2013

Keywords

Comments

A self-inverse permutation on the positive integers: a(a(n)) = n.

Examples

			n = 2^3 => a(n) = 3^4 = 81.
n = 3^2 => a(n) = 2^1 = 2.
		

Crossrefs

Programs

  • Maple
    a:= n-> mul(ithprime(i[1])^i[2], i=map(x->map(y->y-1+2*irem(y, 2),
            [numtheory[pi](x[1]), x[2]]), ifactors(n)[2])):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 17 2013
  • Mathematica
    a[n_] := If[n == 1, 1, Product[{p, e} = pe; Prime[BitXor[PrimePi[p] - 1, 1] + 1]^(BitXor[e - 1, 1] + 1), {pe, FactorInteger[n]}]];
    Array[a, 100] (* Jean-François Alcover, May 31 2019, after Andrew Howroyd *)
  • PARI
    a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); prime( bitxor( primepi(p)-1, 1)+1)^(bitxor(e-1, 1)+1))} \\ Andrew Howroyd, Jul 23 2018
    
  • Python
    primes = [2]*2
    primes[1] = 3
    def addPrime(k):
      for p in primes:
        if k%p==0:  return
        if p*p > k:  break
      primes.append(k)
    for n in range(5, 1000000, 6):
      addPrime(n)
      addPrime(n+2)
    for n in range(1,99):
      p = 1
      j = n
      i = 0
      while j>1:
        e = 0
        while j % primes[i] == 0:
          j /= primes[i]
          e+=1
        if e:
          e = ((e-1)^1) + 1
          p*= primes[i^1]**e
        i += 1
      print(str(p), end=', ')

Formula

Sum_{k=1..n} a(k) ~ c * n^3, where c = (1/3) * Product_{p prime} ((p-1)*(p^6 + q(p) +(p^3-1)*q(p)^2))/(p^7 - p*q(p)^2) = 0.3120270364..., where q(p) = nextprime(p) = A151800(p) if p has an odd index, and q(p) = prevprime(p) = A151799(p) otherwise. - Amiram Eldar, Sep 17 2023

Extensions

Keyword:mult added by Andrew Howroyd, Jul 23 2018

A366423 Multiplicative with a(p^e) = p^(e+1-p) if p|e, and p^(e+1) otherwise.

Original entry on oeis.org

1, 4, 9, 2, 25, 36, 49, 16, 27, 100, 121, 18, 169, 196, 225, 8, 289, 108, 361, 50, 441, 484, 529, 144, 125, 676, 3, 98, 841, 900, 961, 64, 1089, 1156, 1225, 54, 1369, 1444, 1521, 400, 1681, 1764, 1849, 242, 675, 2116, 2209, 72, 343, 500, 2601, 338, 2809, 12, 3025
Offset: 1

Views

Author

Amiram Eldar, Nov 17 2023

Keywords

Comments

A permutation of the positive integers. 1 is the only fixed point.
a(n) is a powerful number (A001694) if and only if n is not in A100717.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := p^(e + 1 + If[Mod[e, p] == 0, -p, 0]); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i,1]^(f[i,2] + 1 + if(!(f[i,2]%f[i,1]), -f[i,1])));}

Formula

a(2^e) = 2^A103889(e).
a(3^e) = 3^A130508(e).
A007947(a(n)) = A007947(n).
a(A051674(n)) = A000040(n).
a(n) is squarefree (A005117) if and only if n is in A048102.
a(A048102(n)) = A007947(A048102(n)).
a(n) == 0 (mod n) if and only if n is not in A342090.
a(n) | n if and only if n is in A072873.
Sum_{k=1..n} a(k) ~ c * n^3 / 3, where c = Product_{p prime} (1 - 1/p + 1/(1 + p) - (p-1)/(p^p * (1 + p^p))) = 0.660264348361... .
Showing 1-3 of 3 results.