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-10 of 10 results.

A322313 Lexicographically earliest such sequence a that a(i) = a(j) => A322312(i) = A322312(j) for all i, j.

Original entry on oeis.org

1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 2, 1, 8, 1, 9, 1, 9, 1, 6, 1, 10, 1, 2, 1, 11, 1, 12, 1, 13, 1, 2, 1, 14, 1, 2, 1, 10, 1, 15, 1, 11, 1, 6, 1, 16, 1, 6, 1, 11, 1, 17, 1, 18, 1, 6, 1, 19, 1, 2, 1, 20, 1, 12, 1, 3, 1, 21, 1, 22, 1, 2, 1, 3, 1, 23, 1, 16, 1, 6, 1, 24, 1, 2, 1, 25, 1, 26, 1, 11, 1, 2, 1, 27, 1, 2, 1, 28, 1, 23, 1, 18, 1
Offset: 1

Views

Author

Antti Karttunen, Dec 03 2018

Keywords

Comments

Restricted growth sequence transform of A322312.

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A322312(n) = { my(m=1,p); fordiv(n,d,p=1+d; if(isprime(p), for(i=0,oo,if(n%(p^i),m *= prime(i);break)))); (m); };
    v322313 = rgs_transform(vector(up_to, n, A322312(n)));
    A322313(n) = v322313[n];

A322314 Lexicographically earliest such sequence a that a(i) = a(j) => A046523(i) = A046523(j) and A322312(i) = A322312(j), for all i, j.

Original entry on oeis.org

1, 2, 3, 4, 3, 5, 3, 6, 7, 8, 3, 9, 3, 10, 11, 12, 3, 13, 3, 13, 11, 8, 3, 14, 7, 10, 15, 16, 3, 17, 3, 18, 11, 10, 11, 19, 3, 10, 11, 14, 3, 20, 3, 16, 21, 8, 3, 22, 7, 23, 11, 16, 3, 24, 11, 25, 11, 8, 3, 26, 3, 10, 21, 27, 11, 17, 3, 28, 11, 29, 3, 30, 3, 10, 21, 28, 11, 31, 3, 22, 32, 8, 3, 33, 11, 10, 11, 34, 3, 35, 11, 16, 11, 10, 11, 36, 3, 37, 21, 38
Offset: 1

Views

Author

Antti Karttunen, Dec 03 2018

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A046523(n), A322312(n)].

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A322312(n) = { my(m=1,p); fordiv(n,d,p=1+d; if(isprime(p), for(i=0,oo,if(n%(p^i),m *= prime(i);break)))); (m); };
    v322314 = rgs_transform(vector(up_to, n, [A046523(n), A322312(n)]));
    A322314(n) = v322314[n];

A181819 Prime shadow of n: a(1) = 1; for n>1, if n = Product prime(i)^e(i), then a(n) = Product prime(e(i)).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 3, 4, 2, 6, 2, 4, 4, 7, 2, 6, 2, 6, 4, 4, 2, 10, 3, 4, 5, 6, 2, 8, 2, 11, 4, 4, 4, 9, 2, 4, 4, 10, 2, 8, 2, 6, 6, 4, 2, 14, 3, 6, 4, 6, 2, 10, 4, 10, 4, 4, 2, 12, 2, 4, 6, 13, 4, 8, 2, 6, 4, 8, 2, 15, 2, 4, 6, 6, 4, 8, 2, 14, 7, 4, 2, 12, 4, 4, 4, 10, 2, 12, 4, 6, 4, 4, 4, 22, 2, 6, 6, 9, 2, 8, 2, 10, 8
Offset: 1

Views

Author

Matthew Vandermast, Dec 07 2010

Keywords

Comments

a(n) depends only on prime signature of n (cf. A025487). a(m) = a(n) iff m and n have the same prime signature, i.e., iff A046523(m) = A046523(n).
Because A046523 (the smallest representative of prime signature of n) and this sequence are functions of each other as A046523(n) = A181821(a(n)) and a(n) = a(A046523(n)), it implies that for all i, j: a(i) = a(j) <=> A046523(i) = A046523(j) <=> A101296(i) = A101296(j), i.e., that equivalence-class-wise this is equal to A101296, and furthermore, applying any function f on this sequence gives us a sequence b(n) = f(a(n)) whose equivalence class partitioning is equal to or coarser than that of A101296, i.e., b is then a sequence that depends only on the prime signature of n (the multiset of exponents of its prime factors), although not necessarily in a very intuitive way. - Antti Karttunen, Apr 28 2022

Examples

			20 = 2^2*5 has the exponents (2,1) in its prime factorization. Accordingly, a(20) = prime(2)*prime(1) = A000040(2)*A000040(1) = 3*2 = 6.
		

Crossrefs

Programs

Formula

From Antti Karttunen, Feb 07 2016: (Start)
a(1) = 1; for n > 1, a(n) = A000040(A067029(n)) * a(A028234(n)).
a(1) = 1; for n > 1, a(n) = A008578(A001511(n)) * a(A064989(n)).
Other identities. For all n >= 1:
a(A124859(n)) = A122111(a(n)) = A238745(n). - from Matthew Vandermast's formulas for the latter sequence.
(End)
a(n) = A246029(A156552(n)). - Antti Karttunen, Oct 15 2016
From Antti Karttunen, Apr 28 & Apr 30 2022: (Start)
A181821(a(n)) = A046523(n) and a(A046523(n)) = a(n). [See comments]
a(n) = A329900(A124859(n)) = A319626(A124859(n)).
a(n) = A246029(A156552(n)).
a(a(n)) = A328830(n).
a(A304660(n)) = n.
a(A108951(n)) = A122111(n).
a(A185633(n)) = A322312(n).
a(A025487(n)) = A181820(n).
a(A276076(n)) = A275735(n) and a(A276086(n)) = A328835(n).
As the sequence converts prime exponents to prime indices, it effects the following mappings:
A001221(a(n)) = A071625(n). [Number of distinct indices --> Number of distinct exponents]
A001222(a(n)) = A001221(n). [Number of indices (i.e., the number of prime factors with multiplicity) --> Number of exponents (i.e., the number of distinct prime factors)]
A056239(a(n)) = A001222(n). [Sum of indices --> Sum of exponents]
A066328(a(n)) = A136565(n). [Sum of distinct indices --> Sum of distinct exponents]
A003963(a(n)) = A005361(n). [Product of indices --> Product of exponents]
A290103(a(n)) = A072411(n). [LCM of indices --> LCM of exponents]
A156061(a(n)) = A290107(n). [Product of distinct indices --> Product of distinct exponents]
A257993(a(n)) = A134193(n). [Index of the least prime not dividing n --> The least number not among the exponents]
A055396(a(n)) = A051904(n). [Index of the least prime dividing n --> Minimal exponent]
A061395(a(n)) = A051903(n). [Index of the greatest prime dividing n --> Maximal exponent]
A008966(a(n)) = A351564(n). [All indices are distinct (i.e., n is squarefree) --> All exponents are distinct]
A007814(a(n)) = A056169(n). [Number of occurrences of index 1 (i.e., the 2-adic valuation of n) --> Number of occurrences of exponent 1]
A056169(a(n)) = A136567(n). [Number of unitary prime divisors --> Number of exponents occurring only once]
A064989(a(n)) = a(A003557(n)) = A295879(n). [Indices decremented after <--> Exponents decremented before]
Other mappings:
A007947(a(n)) = a(A328400(n)) = A329601(n).
A181821(A007947(a(n))) = A328400(n).
A064553(a(n)) = A000005(n) and A000005(a(n)) = A182860(n).
A051903(a(n)) = A351946(n).
A003557(a(n)) = A351944(n).
A258851(a(n)) = A353379(n).
A008480(a(n)) = A309004(n).
a(A325501(n)) = A325507(n) and a(A325502(n)) = A038754(n+1).
a(n!) = A325508(n).
(End)

Extensions

Name "Prime shadow" (coined by Gus Wiseman in A325755) prefixed to the definition by Antti Karttunen, Apr 27 2022

A067513 Number of divisors d of n such that d+1 is prime.

Original entry on oeis.org

1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, 2, 1, 4, 1, 4, 1, 4, 1, 3, 1, 5, 1, 2, 1, 4, 1, 5, 1, 4, 1, 2, 1, 7, 1, 2, 1, 5, 1, 4, 1, 4, 1, 3, 1, 6, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 8, 1, 2, 1, 4, 1, 5, 1, 3, 1, 4, 1, 8, 1, 2, 1, 3, 1, 4, 1, 6, 1, 3, 1, 7, 1, 2, 1, 5, 1, 6, 1, 4, 1, 2, 1, 7, 1, 2, 1, 5, 1, 4, 1
Offset: 1

Views

Author

Amarnath Murthy, Feb 12 2002

Keywords

Comments

1, 2 and 4 are the only numbers such that for every divisor d, d+1 is a prime.
These and only these primes appear as prime divisors of any term of InvPhi(n) set if n is not empty, i.e., if n is from A002202. - Labos Elemer, Jun 24 2002
a(n) is the number of integers k such that n = k - k/p where p is one of the prime divisors of k. (See, e.g., A064097 and A333123, which are related to the mapping k -> k - k/p.) - Robert G. Wilson v, Jun 12 2022

Examples

			a(12) = 5 as the divisors of 12 are 1, 2, 3, 4, 6 and 12 and the corresponding primes are 2,3,5,7 and 13. Only 3+1 = 4 is not a prime.
		

Crossrefs

Even-indexed terms give A046886.
Cf. A005408 (positions of 1's), A051222 (of 2's).

Programs

  • Haskell
    a067513 = sum . map (a010051 . (+ 1)) . a027750_row
    -- Reinhard Zumkeller, Jul 31 2012
    
  • Maple
    A067513 := proc(n)
        local a,d;
        a := 0 ;
        for d in numtheory[divisors](n) do
            if isprime(d+1) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc:
    seq(A067513(n),n=1..100) ; # R. J. Mathar, Aug 07 2022
  • Mathematica
    a[n_] := Length[Select[Divisors[n]+1, PrimeQ]]
    Table[Count[Divisors[n],?(PrimeQ[#+1]&)],{n,110}] (* _Harvey P. Dale, Feb 29 2012 *)
    a[n_] := DivisorSum[n, 1 &, PrimeQ[# + 1] &]; Array[a, 100] (* Amiram Eldar, Jan 11 2025 *)
  • PARI
    a(n)=sumdiv(n,d,isprime(d+1)) \\ Charles R Greathouse IV, Dec 23 2011
    
  • Python
    from sympy import divisors, isprime
    def a(n): return sum(1 for d in divisors(n, generator=True) if isprime(d+1))
    print([a(n) for n in range(1, 104)]) # Michael S. Branicky, Jul 12 2022

Formula

a(n) = 2 iff Bernoulli number B_{n} has denominator 6 (cf. A051222). - Vladeta Jovovic, Feb 13 2002
a(n) <= A141197(n). - Reinhard Zumkeller, Oct 06 2008
a(n) = A001221(A027760(n)). - Enrique Pérez Herrero, Dec 23 2011
a(n) = Sum_{k = 1..A000005(n)} A010051(A027750(n,k)+1). - Reinhard Zumkeller, Jul 31 2012
a(n) = A001221(A185633(n)) = A001222(A322312(n)). - Antti Karttunen, Jul 12 2022
Sum_{k=1..n} a(k) = n * (log(log(n)) + B) + O(n/log(n)), where B is a constant (Prachar, 1955). - Amiram Eldar, Jan 11 2025

Extensions

Edited by Dean Hickerson, Feb 12 2002

A185633 For odd n, a(n) = 2; for even n, a(n) = denominator of Bernoulli(n)/n; The number 2 alternating with the elements of A006953.

Original entry on oeis.org

2, 12, 2, 120, 2, 252, 2, 240, 2, 132, 2, 32760, 2, 12, 2, 8160, 2, 14364, 2, 6600, 2, 276, 2, 65520, 2, 12, 2, 3480, 2, 85932, 2, 16320, 2, 12, 2, 69090840, 2, 12, 2, 541200, 2, 75852, 2, 2760, 2, 564, 2, 2227680, 2, 132, 2, 6360
Offset: 1

Views

Author

Paul Curtz, Dec 18 2012

Keywords

Comments

There is an integer sequence b(n) = A053657(n)/2^(n-1) = 1, 1, 6, 6, 360, 360, 45360, 45360, 5443200, 5443200,... which consists of the duplicated entries of A202367.
The ratios of this sequence are b(n+1)/b(n) = 1, 6, 1, 60, 1, 126 .... = a(n)/2, which is a variant of A036283.

Crossrefs

Cf. A006953, A007395 (bisections).
Cf. A006863, A027760, A067513, A322312, A322315 (rgs-transform).

Programs

  • Maple
    A185633 := proc(n)
        A053657(n+1)/A053657(n) ;
    end proc: # R. J. Mathar, Dec 19 2012
  • Mathematica
    max = 52; s = Expand[Normal[Series[(-Log[1-x]/x)^z, {x, 0, max}]]]; a[n_, k_] := Denominator[Coefficient[s, x^n*z^k]]; A053657 = Prepend[LCM @@@ Table[a[n, k], {n, max}, {k, n}], 1]; a[n_] := A053657[[n+1]]/A053657[[n]]; Table[a[n], {n, 1, max}] (* Jean-François Alcover, Dec 20 2012 *)
  • PARI
    A185633(n) = if(n%2,2,denominator(bernfrac(n)/(n))); \\ Antti Karttunen, Dec 03 2018
    
  • PARI
    A185633(n) = { my(m=1); fordiv(n, d, if(isprime(1+d), m *= (1+d)^(1+valuation(n,1+d)))); (m); }; \\ Antti Karttunen, Dec 03 2018

Formula

a(n) = A053657(n+1)/A053657(n).
a(2*n) = 2*A036283(n).
From Antti Karttunen, Dec 03 2018: (Start)
a(n) = Product_{d|n} [(1+d)^(1+A286561(n,1+d))]^A010051(1+d) - after Peter J. Cameron's Mar 25 2002 comment in A006863.
A007947(a(n)) = A027760(n)
A001221(a(n)) = A067513(n).
A181819(a(n)) = A322312(n).
(End)

Extensions

Name edited by Antti Karttunen, Dec 03 2018

A322310 a(n) = Product_{d|n, d+1 is prime} A008578(1+[Sum_{i=0..A286561(n,1+d)} A320000((n/d)/((1+d)^i), 1+d)]). Here A286561(n,k) gives the k-valuation of n (for k > 1).

Original entry on oeis.org

3, 6, 1, 10, 1, 12, 1, 14, 1, 4, 1, 28, 1, 1, 1, 22, 1, 12, 1, 20, 1, 4, 1, 102, 1, 1, 1, 4, 1, 4, 1, 26, 1, 1, 1, 66, 1, 1, 1, 104, 1, 12, 1, 6, 1, 4, 1, 92, 1, 1, 1, 4, 1, 4, 1, 6, 1, 4, 1, 132, 1, 1, 1, 34, 1, 4, 1, 1, 1, 4, 1, 1240, 1, 1, 1, 1, 1, 4, 1, 57, 1, 4, 1, 21, 1, 1, 1, 28, 1, 1, 1, 6, 1, 1, 1, 492, 1, 1, 1, 12, 1, 4, 1, 6, 1
Offset: 1

Views

Author

Antti Karttunen, Dec 03 2018

Keywords

Crossrefs

Cf. A014197, A320000, A322311 (rgs-transform).
Cf. also A322312.

Programs

  • PARI
    A320000sq(n, k) = if(1==n, if(1==k,2,1), sumdiv(n, d, if(d>=k && isprime(d+1), my(p=d+1, q=n/d); sum(i=0, valuation(n, p), A320000sq(q/(p^i), p))))); \\ From A320000
    A322310(n) = if(1==n,3,my(m=1); fordiv(n,d, my(s, p=d+1, q=n/d); if(isprime(p) && (s = sum(i=0,valuation(n, p), A320000sq(q/(p^i),p))), m *= prime(s))); (m));

Formula

a(n) = Product_{d|n} A008578(1+[Sum_{i=0..A286561(n,1+d)} A320000((n/d)/((1+d)^i), 1+d)])^A010051(1+d).
For all n, A056239(a(n)) = A014197(n).

A327167 a(n) = Product_{d|A276086(n), d>1} A008578(1+A286561(n,d)), where A286561(n,d) gives the highest exponent of d dividing n.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 8, 1, 1, 1, 1, 2, 2, 1, 1, 1, 6, 1, 5, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 1, 12, 1, 1, 1, 3, 6, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 2, 8, 1, 1, 1, 1, 48, 1, 2, 1, 1, 2, 7, 1, 1, 2, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 6, 3, 3, 1, 1, 1, 1, 128
Offset: 1

Views

Author

Antti Karttunen, Sep 19 2019

Keywords

Crossrefs

Programs

  • PARI
    A276086(n) = { my(i=0,m=1,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr),m*=(prime(i)^((n%nextpr)/pr));n-=(n%nextpr));pr=nextpr); m; };
    A327167(n) = { my(m=1,v); fordiv(A276086(n),d,if((d>1) && ((v = valuation(n,d))>0), m *= prime(v))); (m); };

Formula

a(n) = Product_{d|A276086(n), d>1} A008578(1+A286561(n,d)).
Other identities. For all n >= 1:
1+A001222(a(n)) = A327168(n).

A327154 a(n) = Product_{d|n, d>1} A008578(1+A286561(sigma(n),d)), where A286561(n,d) gives the highest exponent of d dividing n.

Original entry on oeis.org

1, 1, 1, 1, 1, 12, 1, 1, 1, 2, 1, 6, 1, 5, 2, 1, 1, 2, 1, 2, 1, 3, 1, 48, 1, 2, 1, 80, 1, 45, 1, 1, 2, 2, 1, 1, 1, 3, 1, 8, 1, 44, 1, 6, 2, 5, 1, 6, 1, 1, 3, 2, 1, 20, 1, 20, 1, 2, 1, 80, 1, 11, 1, 1, 1, 63, 1, 2, 2, 7, 1, 2, 1, 2, 1, 6, 1, 20, 1, 2, 1, 2, 1, 264, 1, 3, 2, 6, 1, 48, 2, 10, 1, 7, 2, 108, 1, 1, 2, 1, 1, 125, 1, 2, 2
Offset: 1

Views

Author

Antti Karttunen, Sep 18 2019

Keywords

Crossrefs

Programs

  • PARI
    A327154(n) = { my(m=1,s=sigma(n),v); fordiv(n,d,if((d>1) && ((v = valuation(s,d))>0), m *= prime(v))); (m); };

Formula

a(n) = Product_{d|n, d>1} A008578(1+A286561(sigma(n),d)), where sigma = A000203.
Other identities. For all n >= 1:
1+A001222(a(n)) = A073802(n).

A327155 a(n) = Product_{d|sigma(n), d>1} A008578(1+A286561(n,d)), where A286561(n,d) gives the highest exponent of d dividing n.

Original entry on oeis.org

1, 1, 1, 1, 1, 8, 1, 1, 1, 2, 1, 6, 1, 2, 2, 1, 1, 3, 1, 3, 1, 2, 1, 80, 1, 2, 1, 48, 1, 8, 1, 1, 2, 2, 1, 1, 1, 2, 1, 20, 1, 8, 1, 6, 3, 2, 1, 21, 1, 1, 2, 3, 1, 20, 1, 20, 1, 2, 1, 48, 1, 2, 1, 1, 1, 8, 1, 3, 2, 2, 1, 3, 1, 2, 1, 6, 1, 8, 1, 7, 1, 2, 1, 48, 1, 2, 2, 10, 1, 48, 2, 6, 1, 2, 2, 264, 1, 1, 3, 1, 1, 8, 1, 5, 2
Offset: 1

Views

Author

Antti Karttunen, Sep 18 2019

Keywords

Crossrefs

Programs

  • PARI
    A327155(n) = { my(m=1,v); fordiv(sigma(n),d,if((d>1) && ((v = valuation(n,d))>0), m *= prime(v))); (m); };

Formula

a(n) = Product_{d|sigma(n), d>1} A008578(1+A286561(n,d)), where sigma = A000203.
Other identities. For all n >= 1:
1+A001222(a(n)) = A073802(n).

A327156 a(n) = Product_{d|n, d>1} A008578(1+A286561(n,sigma(d))), where A286561(n,x) gives the highest exponent of x dividing n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 8, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 5, 1, 8, 1, 1, 1, 16, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 32, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Sep 18 2019

Keywords

Crossrefs

Programs

  • PARI
    A327156(n) = { my(m=1,v); fordiv(n,d,if((d>1) && ((v = valuation(n,sigma(d)))>0), m *= prime(v))); (m); };

Formula

a(n) = Product_{d|n, d>1} A008578(1+A286561(n,sigma(d))), where sigma = A000203.
Other identities. For all n >= 1:
1+A001222(a(n)) = A173441(n).
Showing 1-10 of 10 results.