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 119 results. Next

A243505 Permutation of natural numbers, take the odd bisection of A122111 and divide the largest prime factor out: a(n) = A052126(A122111(2n-1)).

Original entry on oeis.org

1, 2, 4, 8, 3, 16, 32, 6, 64, 128, 12, 256, 9, 5, 512, 1024, 24, 18, 2048, 48, 4096, 8192, 10, 16384, 27, 96, 32768, 36, 192, 65536, 131072, 20, 72, 262144, 384, 524288, 1048576, 15, 54, 2097152, 7, 4194304, 144, 768, 8388608, 108, 1536, 288, 16777216, 40, 33554432, 67108864, 30
Offset: 1

Views

Author

Antti Karttunen, Jun 25 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A052126(A122111((2*n)-1)).
a(n) = A122111((2*n)-1) / A105560((2*n)-1).
As a composition of related permutations:
a(n) = A122111(A064216(n)).
a(n) = A241916(A243065(n)).
Other identities:
For all n >= 2, a(n) = A070003(A244984(n)-1) / A105560((2*n)-1).
For all n >= 1, a(A006254(n)) = A000079(n) and a(A007051(n)) = A000040(n).
For all n >= 1, A105560(2n-1) divides a(n).

A241917 If n is a prime with index i, p_i, a(n) = i, (with a(1)=0), otherwise difference (i-j) of the indices of the two largest primes p_i, p_j, i >= j in the prime factorization of n: a(n) = A061395(n) - A061395(A052126(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 13 2014

Keywords

Comments

Note: the two largest primes in the multiset of prime divisors of n are equal for all numbers that are in A070003, thus, after a(1)=0, A070003 gives the positions of the other zeros in this sequence.

Crossrefs

Cf. A241919, A242411, A243055 for other variants.

Programs

  • Haskell
    a241917 n = i - j where
                (i:j:_) = map a049084 $ reverse (1 : a027746_row n)
    -- Reinhard Zumkeller, May 15 2014
    
  • PARI
    A241917(n) = if(isprime(n), primepi(n), if(1>=omega(n), 0, my(f=factor(n)); if(f[#f~,2]>1, 0, primepi(f[#f~,1])-primepi(f[(#f~)-1,1])))); \\ Antti Karttunen, Jul 10 2024
  • Python
    from sympy import primefactors, primepi
    def a061395(n): return 0 if n==1 else primepi(primefactors(n)[-1])
    def a052126(n): return 1 if n==1 else n/primefactors(n)[-1]
    def a(n): return 0 if n==1 else a061395(n) - a061395(a052126(n)) # Indranil Ghosh, May 19 2017
    
  • Scheme
    (define (A241917 n) (- (A061395 n) (A061395 (A052126 n))))
    

Formula

a(n) = A061395(n) - A061395(A052126(n)).

A300226 Filter sequence combining A046523(n) and A052126(n), the prime signature of n and n/(largest prime dividing n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 01 2018

Keywords

Comments

Restricted growth sequence transform of P(A046523(n), A052126(n)), where P(a,b) is a two-argument form of A000027 used as a Cantor pairing function N x N -> N.

Examples

			a(6) = a(10) (= 4) because both are nonsquare semiprimes (2*3 and 2*5), and when the largest prime factor is divided out, both yield the same quotient, 2.
		

Crossrefs

Cf. also A291761, A300229.

Programs

  • PARI
    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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A052126(n) = if(1==n,n, my(f=factor(n)[, 1], gpf = f[#f]); n/gpf); \\ After code in A052126.
    Aux300226(n) = (1/2)*(2 + ((A052126(n)+A046523(n))^2) - A052126(n) - 3*A046523(n));
    write_to_bfile(1,rgs_transform(vector(65537,n,Aux300226(n))),"b300226.txt");

A253553 a(1) = 1; for n>1, if A241917(n) = 0 [i.e., n is a term of A070003], a(n) = A052126(n), otherwise a(n) = A252462(n).

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 4, 3, 6, 7, 8, 11, 10, 9, 8, 13, 6, 17, 12, 15, 14, 19, 16, 5, 22, 9, 20, 23, 18, 29, 16, 21, 26, 25, 12, 31, 34, 33, 24, 37, 30, 41, 28, 27, 38, 43, 32, 7, 10, 39, 44, 47, 18, 35, 40, 51, 46, 53, 36, 59, 58, 45, 32, 55, 42, 61, 52, 57, 50, 67, 24, 71, 62, 15, 68, 49, 66, 73, 48, 27
Offset: 1

Views

Author

Antti Karttunen, Jan 12 2015

Keywords

Comments

If the exponent of the largest prime dividing n is larger than one, subtract one from that exponent. Otherwise, shift that "lonely largest prime" one step towards smaller primes.
For any number n >= 2 in binary trees A253563 and A253565, a(n) gives the number which is the parent of n.

Crossrefs

Cf. A252464 (the number of iterations of n -> a(n) needed to reach 1 from n.)

Programs

  • PARI
    A253553(n) = if(n<=2,1,my(f=factor(n), k=#f~); if(f[k,2]>1,f[k,2]--,f[k,1] = precprime(f[k,1]-1)); factorback(f)); \\ Antti Karttunen, Jul 17 2020
    
  • Scheme
    (define (A253553 n) (cond ((<= n 1) n) ((zero? (A241917 n)) (A052126 n)) (else (A252462 n))))

Formula

a(1) = 1; for n>1, if A241917(n) = 0 [i.e., n is a term of A070003], a(n) = A052126(n), otherwise a(n) = A252462(n).
a(n) = A122111(A252463(A122111(n))). - Antti Karttunen, Jul 14 2020

A332994 a(1) = 1, for n > 1, a(n) = n + a(A052126(n)).

Original entry on oeis.org

1, 3, 4, 7, 6, 9, 8, 15, 13, 13, 12, 19, 14, 17, 19, 31, 18, 27, 20, 27, 25, 25, 24, 39, 31, 29, 40, 35, 30, 39, 32, 63, 37, 37, 41, 55, 38, 41, 43, 55, 42, 51, 44, 51, 58, 49, 48, 79, 57, 63, 55, 59, 54, 81, 61, 71, 61, 61, 60, 79, 62, 65, 76, 127, 71, 75, 68, 75, 73, 83, 72, 111, 74, 77, 94, 83, 85, 87, 80, 111, 121
Offset: 1

Views

Author

Antti Karttunen, Apr 04 2020

Keywords

Crossrefs

Programs

Formula

a(1) = 1; and for n > 1, a(n) = n + a(A052126(n)).
a(n) = n + A322382(n).
a(n) = A332993(n) - A333791(n).
a(n) = A000203(n) - A333784(n).

A331188 Primorial inflation of A052126(n), where A052126(n) = n/(largest prime dividing n).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 4, 6, 2, 1, 4, 1, 2, 6, 8, 1, 12, 1, 4, 6, 2, 1, 8, 30, 2, 36, 4, 1, 12, 1, 16, 6, 2, 30, 24, 1, 2, 6, 8, 1, 12, 1, 4, 36, 2, 1, 16, 210, 60, 6, 4, 1, 72, 30, 8, 6, 2, 1, 24, 1, 2, 36, 32, 30, 12, 1, 4, 6, 60, 1, 48, 1, 2, 180, 4, 210, 12, 1, 16, 216, 2, 1, 24, 30, 2, 6, 8, 1, 72, 210, 4, 6, 2, 30, 32
Offset: 1

Views

Author

Antti Karttunen, Jan 14 2020

Keywords

Comments

The primorial inflation of n, A108951(n), divided by its largest squarefree divisor, which is also its largest primorial divisor.

Crossrefs

Programs

  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A331188(n) = if(1==n, n, my(f=factor(n)); prod(i=1, #f~, A002110(primepi(f[i, 1]))^(f[i, 2]-(#f~==i))));

Formula

a(n) = A108951(A052126(n)).
a(n) = A003557(A108951(n)).
a(n) = A111701(A108951(n)) = A108951(n) / A002110(A061395(n)).
Other identities. For all >= 1:
A000005(a(n)) = A329382(n) = A005361(A108951(n)).
a(n) mod A117366(n) = A329348(n).

A333794 a(1) = 1, for n > 1, a(n) = n + a(n-A052126(n)).

Original entry on oeis.org

1, 3, 6, 7, 12, 13, 20, 15, 22, 25, 36, 27, 40, 41, 42, 31, 48, 45, 64, 51, 66, 73, 96, 55, 76, 81, 72, 83, 112, 85, 116, 63, 118, 97, 120, 91, 128, 129, 130, 103, 144, 133, 176, 147, 136, 193, 240, 111, 182, 153, 162, 163, 216, 145, 208, 167, 202, 225, 284, 171, 232, 233, 208, 127, 236, 237, 304, 195, 306, 241, 312, 183, 256, 257
Offset: 1

Views

Author

Antti Karttunen, Apr 05 2020

Keywords

Comments

Conjecturally, also the largest path sum when iterating from n to 1 with nondeterministic map k -> k - k/p, where p is any prime factor of k.

Examples

			For n=119, the graph obtained is this:
              119
             _/\_
            /    \
          102    112
         _/|\_    | \_
       _/  |  \_  |   \_
      /    |    \ |     \
    51     68    96     56
    /|   _/ |   _/|   _/ |
   / | _/   | _/  | _/   |
  /  |/     |/    |/     |
(48) 34    64     48    28
     |\_    |    _/|   _/|
     |  \_  |  _/  | _/  |
     |    \_|_/    |/    |
    17     32     24    14
      \_    |    _/|   _/|
        \_  |  _/  | _/  |
          \_|_/    |/    |
           16      12    7
            |    _/|    _/
            |  _/  |  _/
            |_/    |_/
            8     _6
            |  __/ |
            |_/    |
            4      3
             \     /
              \_ _/
                2
                |
                1.
If we always subtract A052126(n) (i.e., n divided by its largest prime divisor), i.e., iterate with A171462 (starting from 119), we obtain 119-(119/17) = 112 -> 112-(112/7) -> 96-(96/3) -> 64-(64/2) -> 32-(32/2) -> 16-(16/2) -> 8-(8/2) -> 4-(4/2) -> 2-(2/2) -> 1, with sum 119+112+96+64+32+16+8+4+2+1 = 554, thus a(119) = 554. This happens also to be maximal sum of any path in above diagram.
		

Crossrefs

Programs

  • Mathematica
    Array[Total@ NestWhileList[# - #/FactorInteger[#][[-1, 1]] &, #, # > 1 &] &, 74] (* Michael De Vlieger, Apr 14 2020 *)
  • PARI
    A333794(n) = if(1==n,n,n + A333794(n-(n/vecmax(factor(n)[, 1]))));

Formula

a(1) = 1; and for n > 1, a(n) = n + a(A171462(n)) = n + a(n-A052126(n)).
a(n) = A073934(n) + A333793(n).
a(n) = n + Max a(n - n/p), for p prime and dividing n. [Conjectured, holds at least up to n=2^24]
For all n >= 1, A333790(n) <= a(n) <= A332904(n).
For all n >= 1, a(n) >= A332993(n). [Apparently, have to check!]

A319994 Let g = A006530(n), the largest prime factor of n. This filter sequence combines (g mod 4), n/g (A052126), and a single bit A319988(n) telling whether the largest prime factor is unitary.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 05 2018

Keywords

Comments

Restricted growth sequence transform of triple [A010873(A006530(n)), A052126(n), A319988(n)], with a separate value allotted for a(1).
Here among the first 100000 terms, only 2331 have a unique value, compared to 69714 in A320004.
For all i, j:
a(i) = a(j) => A024362(i) = A024362(j),
a(i) = a(j) => A067029(i) = A067029(j),
a(i) = a(j) => A071178(i) = A071178(j),
a(i) = a(j) => A077462(i) = A077462(j) => A101296(i) = A101296(j).

Crossrefs

Cf. also A319996 (modulo 6 analog).

Programs

  • PARI
    up_to = 100000;
    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; };
    A006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
    A052126(n) = (n/A006530(n));
    A319988(n) = ((n>1)&&(factor(n)[omega(n),2]>1));
    A319994aux(n) = if(1==n,0,[A006530(n)%4, A052126(n), A319988(n)]);
    v319994 = rgs_transform(vector(up_to,n,A319994aux(n)));
    A319994(n) = v319994[n];

A319996 Let g = A006530(n), the largest prime factor of n. This filter sequence combines (g mod 6), n/g (A052126), and a single bit A319988(n) telling whether the largest prime factor is unitary.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 11, 7, 12, 13, 14, 5, 15, 7, 16, 17, 10, 5, 18, 19, 12, 20, 21, 5, 22, 7, 23, 13, 10, 24, 25, 7, 12, 17, 26, 5, 27, 7, 16, 28, 10, 5, 29, 30, 31, 13, 21, 5, 32, 33, 34, 17, 10, 5, 35, 7, 12, 36, 37, 24, 22, 7, 16, 13, 38, 5, 39, 7, 12, 40, 21, 41, 27, 7, 42, 43, 10, 5, 44, 33, 12, 13, 26, 5, 45, 46, 16, 17, 10, 24, 47, 7, 48, 28, 49, 5, 22, 7, 34
Offset: 1

Views

Author

Antti Karttunen, Oct 05 2018

Keywords

Comments

Restricted growth sequence transform of triple [A010875(A006530(n)), A052126(n), A319988(n)], with a separate value allotted for a(1).
Many of the same comments as given in A319717 apply also here, except for this filter, the "blind spot" area (where only unique values are possible for a(n)) is different, and contains at least all numbers in A070003. Because presence of 2 or 3 in the prime factorization of n do not force the value of a(n) unique, this is substantially less lax (i.e., more exact) filter than A319717. Here among the first 100000 terms, only 2393 have a unique value, compared to 74355 in A319717.
For all i, j:
a(i) = a(j) => A002324(i) = A002324(j),
a(i) = a(j) => A067029(i) = A067029(j),
a(i) = a(j) => A071178(i) = A071178(j),
a(i) = a(j) => A077462(i) = A077462(j) => A101296(i) = A101296(j),
a(i) = a(j) => A319690(i) = A319690(j).

Examples

			For n = 15 (3*5) and n = 33 (3*11), the mod 6 residue of the largest prime factor is 5, also in both cases it is unitary (A319988(n) = 1), and the quotient n/A006530(n) is equal, in this case 3. Thus a(15) and a(33) are alloted the same running count (13 in this case) by rgs-transform.
For n = 2275 (5^2 * 7 * 13), n = 3325 (5^2 * 7 * 19), 5425 (5^2 * 7 * 31) and 6475 (5^2 * 7 * 37), the largest prime factor = 1 (mod 6), and A052126(n) = 175, thus these numbers are allotted the same running count (394 in this case) by rgs-transform.
		

Crossrefs

Cf. A007528 (positions of 5's), A002476 (of 7's), A112774 (after its initial term gives the position of 10's in this sequence).
Cf. also A319994 (modulo 4 analog).

Programs

  • PARI
    up_to = 100000;
    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; };
    A006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
    A052126(n) = (n/A006530(n));
    A319988(n) = ((n>1)&&(factor(n)[omega(n),2]>1));
    A319996aux(n) = if(1==n,0,[A006530(n)%6, A052126(n), A319988(n)]);
    v319996 = rgs_transform(vector(up_to,n,A319996aux(n)));
    A319996(n) = v319996[n];

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

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 4, 2, 1, 3, 1, 2, 4, 5, 1, 6, 1, 3, 4, 2, 1, 5, 7, 2, 8, 3, 1, 6, 1, 9, 4, 2, 7, 10, 1, 2, 4, 5, 1, 6, 1, 3, 8, 2, 1, 9, 11, 12, 4, 3, 1, 13, 7, 5, 4, 2, 1, 10, 1, 2, 8, 14, 7, 6, 1, 3, 4, 12, 1, 15, 1, 2, 16, 3, 11, 6, 1, 9, 17, 2, 1, 10, 7, 2, 4, 5, 1, 13, 11, 3, 4, 2, 7, 14, 1, 18, 8, 19, 1, 6, 1, 5, 16
Offset: 1

Views

Author

Antti Karttunen, Dec 27 2018

Keywords

Comments

Restricted growth sequence transform of A052126, or equally, of A322820.
For all i, j:
A300226(i) = A300226(j) => a(i) = a(j),
a(i) = a(j) => A322813(i) = A322813(j),
a(i) = a(j) => A322819(i) = A322819(j).
For all i, j > 1:
a(i) = a(j) => A001222(i) = A001222(j).

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; };
    A006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
    A052126(n) = (n/A006530(n));
    v322826 = rgs_transform(vector(up_to,n,A052126(n)));
    A322826(n) = v322826[n];
Showing 1-10 of 119 results. Next