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.

A277898 Square array A(r,c), where each row r lists all numbers k for which A277892(k) = r, read by downwards antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Original entry on oeis.org

3, 4, 5, 6, 9, 7, 8, 12, 25, 11, 10, 14, 33, 49, 13, 18, 15, 35, 58, 93, 17, 22, 16, 44, 65, 119, 169, 19, 24, 20, 45, 77, 121, 185, 287, 23, 30, 21, 51, 91, 124, 209, 289, 361, 29, 32, 26, 55, 95, 143, 214, 299, 437, 529, 31, 40, 27, 57, 106, 161, 221, 323, 473, 589, 802, 37, 42, 28, 60, 111, 177, 247, 327, 493, 611, 841, 934, 41
Offset: 3

Views

Author

Antti Karttunen, Nov 08 2016

Keywords

Comments

Permutation of natural numbers larger than 2.

Examples

			The top left corner of the array:
   3,    4,    6,    8,   10,   18,   22,   24,   30,   32
   5,    9,   12,   14,   15,   16,   20,   21,   26,   27
   7,   25,   33,   35,   44,   45,   51,   55,   57,   60
  11,   49,   58,   65,   77,   91,   95,  106,  111,  115
  13,   93,  119,  121,  124,  143,  161,  177,  187,  203
  17,  169,  185,  209,  214,  221,  247,  254,  301,  305
  19,  287,  289,  299,  323,  327,  391,  393,  398,  403
  23,  361,  437,  473,  493,  551,  565,  629,  633,  685
  29,  529,  589,  611,  667,  713,  779,  817,  889,  893
  31,  802,  841,  842,  851,  899,  901,  989, 1073, 1081
  37,  934,  961, 1121, 1147, 1154, 1189, 1227, 1271, 1293
  41, 1333, 1369, 1403, 1437, 1517, 1538, 1591, 1643, 1761
  43, 1681, 1739, 1763, 1927, 1943, 2183, 2257, 2263, 2302
  47, 1754, 1849, 2021, 2173, 2201, 2279, 2501, 2623, 2747
  53, 2209, 2491, 2537, 2594, 2643, 2701, 2773, 2881, 3053
		

Crossrefs

Transpose: A277897.
Row 1: A277319.
Column 1: A065091, column 2: A277900.
Cf. A277892 (index of the row where n is located), A277895 (of the column).

Programs

Formula

A(r,1) = A065091(r); for c > 1, A(r,c) = A277893(A(r,c-1)).

A277893 A277893(n) = the least k > n for which A277892(k) = A277892(n), 0 if no such number exists.

Original entry on oeis.org

0, 4, 6, 9, 8, 25, 10, 12, 18, 49, 14, 93, 15, 16, 20, 169, 22, 287, 21, 26, 24, 361, 30, 33, 27, 28, 34, 529, 32, 802, 40, 35, 36, 44, 38, 934, 39, 48, 42, 1333, 46, 1681, 45, 51, 54, 1754, 50, 58, 52, 55, 64, 2209, 56, 57, 66, 60, 65, 2809, 62, 2966, 63, 68, 74, 77, 70
Offset: 2

Views

Author

Antti Karttunen, Nov 08 2016

Keywords

Comments

a(n) is the least k larger than n for which the number of divisors of A048675(k) is equal to the number of divisors of A048675(n) (counted with multiplicity), and 0 if no such number exists (which happens only for n=2).

Crossrefs

Programs

  • Scheme
    (define (A277893 n) (cond ((= 2 n) 0) (else (let ((v (A277892 n))) (let loop ((k (+ 1 n))) (if (= (A277892 k) v) k (loop (+ 1 k))))))))

Formula

For n >= 3, A277894(a(n)) = n.

A277894 a(n) = the largest k < n for which A277892(k) = A277892(n), 0 if no such number exists, a(0) = a(1) = 0.

Original entry on oeis.org

0, 0, 0, 0, 3, 0, 4, 0, 6, 5, 8, 0, 9, 0, 12, 14, 15, 0, 10, 0, 16, 20, 18, 0, 22, 7, 21, 26, 27, 0, 24, 0, 30, 25, 28, 33, 34, 0, 36, 38, 32, 0, 40, 0, 35, 44, 42, 0, 39, 11, 48, 45, 50, 0, 46, 51, 54, 55, 49, 0, 57, 0, 60, 62, 52, 58, 56, 0, 63, 68, 66, 0, 70, 0, 64, 74, 69, 65, 75, 0, 76, 80, 78, 0, 81, 84, 82, 86, 72, 0, 87, 77, 85, 13, 92, 91, 88, 0
Offset: 0

Views

Author

Antti Karttunen, Nov 08 2016

Keywords

Crossrefs

Cf. A008578 (gives the positions of zeros after a(0)).

Programs

  • Scheme
    (define (A277894 n) (cond ((<= n 2) 0) (else (let ((v (A277892 n))) (let loop ((k (- n 1))) (cond ((= 1 k) 0) ((= (A277892 k) v) k) (else (loop (- k 1)))))))))

Formula

For n >= 3, a(A277893(n)) = n.

A277900 Column 2 of A277898; position of the second occurrence of n in A277892.

Original entry on oeis.org

4, 9, 25, 49, 93, 169, 287, 361, 529, 802, 934, 1333, 1681, 1754, 2209, 2809, 2966, 3482, 4453, 5041, 5329, 6241, 5378, 6374, 9167
Offset: 1

Views

Author

Antti Karttunen, Nov 08 2016, terms a(18)-a(25) obtained from the 10000 term b-file of A277892 computed by Hans Havermann

Keywords

Comments

a(n) = the second smallest number k for which A277892(k) = n, where A277892(n) = the number of prime divisors (counted with multiplicity) of A048675(n).
Note that the sequence is not monotonic: a(22) = 6241 and a(23) = 5378.

Examples

			A277892[2..4] = [0, 1, 1], thus as the second 1 occurs at A277892(4), a(1) = 4.
A277892[5..9] = [2, 1, 3, 1, 2], thus as the second 2 occurs at A277892(9), a(2) = 9.
		

Crossrefs

Column 2 of A277898.
Cf. A001248 (an upper bound), A048675, A065091, A277892, A277893.

Programs

Formula

a(n) = A277893(A065091(n)).
a(n) <= A001248(n).

A048675 If n = p_i^e_i * ... * p_k^e_k, p_i < ... < p_k primes (with p_i = prime(i)), then a(n) = (1/2) * (e_i * 2^i + ... + e_k * 2^k).

Original entry on oeis.org

0, 1, 2, 2, 4, 3, 8, 3, 4, 5, 16, 4, 32, 9, 6, 4, 64, 5, 128, 6, 10, 17, 256, 5, 8, 33, 6, 10, 512, 7, 1024, 5, 18, 65, 12, 6, 2048, 129, 34, 7, 4096, 11, 8192, 18, 8, 257, 16384, 6, 16, 9, 66, 34, 32768, 7, 20, 11, 130, 513, 65536, 8, 131072, 1025, 12, 6, 36, 19
Offset: 1

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Comments

The original motivation for this sequence was to encode the prime factorization of n in the binary representation of a(n), each such representation being unique as long as this map is restricted to A005117 (squarefree numbers, resulting a permutation of nonnegative integers A048672) or any of its subsequence, resulting an injective function like A048623 and A048639.
However, also the restriction to A260443 (not all terms of which are squarefree) results a permutation of nonnegative integers, namely A001477, the identity permutation.
When a polynomial with nonnegative integer coefficients is encoded with the prime factorization of n (e.g., as in A206296, A260443), then a(n) gives the evaluation of that polynomial at x=2.
The primitive completely additive integer sequence that satisfies a(n) = a(A225546(n)), n >= 1. By primitive, we mean that if b is another such sequence, then there is an integer k such that b(n) = k * a(n) for all n >= 1. - Peter Munn, Feb 03 2020
If the binary rank of an integer partition y is given by Sum_i 2^(y_i-1), and the Heinz number is Product_i prime(y_i), then a(n) is the binary rank of the integer partition with Heinz number n. Note the function taking a set s to Sum_i 2^(s_i-1) is the inverse of A048793 (binary indices), and the function taking a multiset m to Product_i prime(m_i) is the inverse of A112798 (prime indices). - Gus Wiseman, May 22 2024

Examples

			From _Gus Wiseman_, May 22 2024: (Start)
The A018819(7) = 6 cases of binary rank 7 are the following, together with their prime indices:
   30: {1,2,3}
   40: {1,1,1,3}
   54: {1,2,2,2}
   72: {1,1,1,2,2}
   96: {1,1,1,1,1,2}
  128: {1,1,1,1,1,1,1}
(End)
		

Crossrefs

Row 2 of A104244.
Similar logarithmic functions: A001414, A056239, A090880, A289506, A293447.
Left inverse of the following sequences: A000079, A019565, A038754, A068911, A134683, A260443, A332824.
A003961, A028234, A032742, A055396, A064989, A067029, A225546, A297845 are used to express relationship between terms of this sequence.
Cf. also A048623, A048676, A099884, A277896 and tables A277905, A285325.
Cf. A297108 (Möbius transform), A332813 and A332823 [= a(n) mod 3].
Pairs of sequences (f,g) that satisfy a(f(n)) = g(n), possibly with offset change: (A000203,A331750), (A005940,A087808), (A007913,A248663), (A007947,A087207), (A097248,A048675), (A206296,A000129), (A248692,A056239), (A283477,A005187), (A284003,A006068), (A285101,A028362), (A285102,A068052), (A293214,A001065), (A318834,A051953), (A319991,A293897), (A319992,A293898), (A320017,A318674), (A329352,A069359), (A332461,A156552), (A332462,A156552), (A332825,A000010) and apparently (A163511,A135529).
See comments/formulas in A277333, A331591, A331740 giving their relationship to this sequence.
The formula section details how the sequence maps the terms of A329050, A329332.
A277892, A322812, A322869, A324573, A324575 give properties of the n-th term of this sequence.
The term k appears A018819(k) times.
The inverse transformation is A019565 (Heinz number of binary indices).
The version for distinct prime indices is A087207.
Numbers k such that a(k) is prime are A277319, counts A372688.
Grouping by image gives A277905.
A014499 lists binary indices of prime numbers.
A061395 gives greatest prime index, least A055396.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.
Binary indices:
- listed A048793, sum A029931
- reversed A272020
- opposite A371572, sum A230877
- length A000120, complement A023416
- min A001511, opposite A000012
- max A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359

Programs

  • Maple
    nthprime := proc(n) local i; if(isprime(n)) then for i from 1 to 1000000 do if(ithprime(i) = n) then RETURN(i); fi; od; else RETURN(0); fi; end; # nthprime(2) = 1, nthprime(3) = 2, nthprime(5) = 3, etc. - this is also A049084.
    A048675 := proc(n) local s,d; s := 0; for d in ifactors(n)[ 2 ] do s := s + d[ 2 ]*(2^(nthprime(d[ 1 ])-1)); od; RETURN(s); end;
    # simpler alternative
    f:= n -> add(2^(numtheory:-pi(t[1])-1)*t[2], t=ifactors(n)[2]):
    map(f, [$1..100]); # Robert Israel, Oct 10 2016
  • Mathematica
    a[1] = 0; a[n_] := Total[ #[[2]]*2^(PrimePi[#[[1]]]-1)& /@ FactorInteger[n] ]; Array[a, 100] (* Jean-François Alcover, Mar 15 2016 *)
  • PARI
    a(n) = my(f = factor(n)); sum(k=1, #f~, f[k,2]*2^primepi(f[k,1]))/2; \\ Michel Marcus, Oct 10 2016
    
  • PARI
    \\ The following program reconstructs terms (e.g. for checking purposes) from the factorization file prepared by Hans Havermann:
    v048675sigs = readvec("a048675.txt");
    A048675(n) = if(n<=2,n-1,my(prsig=v048675sigs[n],ps=prsig[1],es=prsig[2]); prod(i=1,#ps,ps[i]^es[i])); \\ Antti Karttunen, Feb 02 2020
    
  • Python
    from sympy import factorint, primepi
    def a(n):
        if n==1: return 0
        f=factorint(n)
        return sum([f[i]*2**(primepi(i) - 1) for i in f])
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Jun 19 2017

Formula

a(1) = 0, a(n) = 1/2 * (e1*2^i1 + e2*2^i2 + ... + ez*2^iz) if n = p_{i1}^e1*p_{i2}^e2*...*p_{iz}^ez, where p_i is the i-th prime. (e.g. p_1 = 2, p_2 = 3).
Totally additive with a(p^e) = e * 2^(PrimePi(p)-1), where PrimePi(n) = A000720(n). [Missing factor e added to the comment by Antti Karttunen, Jul 29 2015]
From Antti Karttunen, Jul 29 2015: (Start)
a(1) = 0; for n > 1, a(n) = 2^(A055396(n)-1) + a(A032742(n)). [Where A055396(n) gives the index of the smallest prime dividing n and A032742(n) gives the largest proper divisor of n.]
a(1) = 0; for n > 1, a(n) = (A067029(n) * (2^(A055396(n)-1))) + a(A028234(n)).
Other identities. For all n >= 0:
a(A019565(n)) = n.
a(A260443(n)) = n.
a(A206296(n)) = A000129(n).
a(A005940(n+1)) = A087808(n).
a(A007913(n)) = A248663(n).
a(A007947(n)) = A087207(n).
a(A283477(n)) = A005187(n).
a(A284003(n)) = A006068(n).
a(A285101(n)) = A028362(1+n).
a(A285102(n)) = A068052(n).
Also, it seems that a(A163511(n)) = A135529(n) for n >= 1. (End)
a(1) = 0, a(2n) = 1+a(n), a(2n+1) = 2*a(A064989(2n+1)). - Antti Karttunen, Oct 11 2016
From Peter Munn, Jan 31 2020: (Start)
a(n^2) = a(A003961(n)) = 2 * a(n).
a(A297845(n,k)) = a(n) * a(k).
a(n) = a(A225546(n)).
a(A329332(n,k)) = n * k.
a(A329050(n,k)) = 2^(n+k).
(End)
From Antti Karttunen, Feb 02-25 2020, Feb 01 2021: (Start)
a(n) = Sum_{d|n} A297108(d) = Sum_{d|A225546(n)} A297108(d).
a(n) = a(A097248(n)).
For n >= 2:
A001221(a(n)) = A322812(n), A001222(a(n)) = A277892(n).
A000203(a(n)) = A324573(n), A033879(a(n)) = A324575(n).
For n >= 1, A331750(n) = a(A000203(n)).
For n >= 1, the following chains hold:
A293447(n) >= a(n) >= A331740(n) >= A331591(n).
a(n) >= A087207(n) >= A248663(n).
(End)
a(n) = A087207(A097248(n)). - Flávio V. Fernandes, Jul 16 2025

Extensions

Entry revised by Antti Karttunen, Jul 29 2015
More linking formulas added by Antti Karttunen, Apr 18 2017

A277319 Numbers k such that A048675(k) is a prime.

Original entry on oeis.org

3, 4, 6, 8, 10, 18, 22, 24, 30, 32, 40, 42, 46, 54, 56, 66, 70, 72, 88, 96, 98, 102, 114, 118, 126, 128, 130, 136, 150, 152, 168, 182, 200, 224, 234, 238, 246, 250, 266, 270, 294, 312, 318, 328, 330, 350, 354, 360, 370, 392, 402, 406, 416, 424, 434, 440, 442, 450, 472, 480, 486, 510, 536, 546, 594, 600, 630, 640, 646, 648, 650, 654, 666, 680, 690, 722
Offset: 1

Views

Author

Antti Karttunen, Oct 11 2016

Keywords

Comments

After 3 and 4 each term is an even number with an odd exponent of 2. - David A. Corneth and Antti Karttunen, Oct 11 2016

Crossrefs

Row 1 of A277898. Positions of ones in A277892.
Cf. A048675 and A277321 for the primes themselves.
Cf. A277317 (a subsequence).
After two initial terms a subsequence of A036554.

Programs

  • PARI
    allocatemem(2^30);
    A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From Michel Marcus, Oct 10 2016
    isA277319 = n -> isprime(A048675(n));
    i=0; n=1; while(i < 10000, n++; if(isA277319(n), i++; write("b277319.txt", i, " ", n)));
    
  • Python
    from sympy import factorint, primepi, isprime
    def a048675(n):
        if n==1: return 0
        f=factorint(n)
        return sum([f[i]*2**(primepi(i) - 1) for i in f])
    print([n for n in range(1, 1001) if isprime(a048675(n))]) # Indranil Ghosh, Jun 19 2017

A322812 a(n) = A001221(A048675(n)).

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 2, 1, 3, 2, 1, 1, 1, 2, 2, 2, 2, 1, 1, 3, 3, 1, 1, 1, 1, 2, 2, 3, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 1, 1, 1, 2, 3, 3, 3, 3, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2
Offset: 2

Views

Author

Antti Karttunen, Dec 27 2018

Keywords

Crossrefs

Programs

Formula

a(n) = A001221(A048675(n)).
a(n) <= A277892(n).

A324573 a(1) = 0; for n > 1, a(n) = sigma(A048675(n)).

Original entry on oeis.org

0, 1, 3, 3, 7, 4, 15, 4, 7, 6, 31, 7, 63, 13, 12, 7, 127, 6, 255, 12, 18, 18, 511, 6, 15, 48, 12, 18, 1023, 8, 2047, 6, 39, 84, 28, 12, 4095, 176, 54, 8, 8191, 12, 16383, 39, 15, 258, 32767, 12, 31, 13, 144, 54, 65535, 8, 42, 12, 252, 800, 131071, 15, 262143, 1302, 28, 12, 91, 20, 524287, 144, 528, 14, 1048575, 8, 2097151, 2736, 18
Offset: 1

Views

Author

Antti Karttunen, Mar 08 2019

Keywords

Crossrefs

Programs

  • PARI
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
    A324573(n) = if(1==n,0,sigma(A048675(n)));

Formula

a(1) = 0; for n > 1, a(n) = A000203(A048675(n)).

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

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 27 2018

Keywords

Comments

Restricted growth sequence transform of A048675.
For all i, j > 1:
a(i) = a(j) => A277892(i) = A277892(j),
a(i) = a(j) => A322812(i) = A322812(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; };
    A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675
    v322815 = rgs_transform(vector(up_to,n,A048675(n)));
    A322815(n) = v322815[n];

A277895 a(n) is the index of the column where n is located in array A277898, a(2) = 0.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 08 2016

Keywords

Comments

a(2) = 0 as 2 does not occur in the array A277898 proper.
From a(3) onward the ordinal transform of A277892 from its first nonzero term a(3) onward: 1, 1, 2, 1, 3, 1, 2, 1, 4, 2, 5, 2, 2, 2, 6, 1, 7, 2, ... The relation does not hold the other way, because not all columns of A277898 are monotonic, for example, 16 is located below 18 in the sixth column of that array. Already the array's second column (A277900) is nonmonotonic.

Crossrefs

Programs

  • Mathematica
    A048675[n_] := If[n == 1, 0, Total[#[[2]]*2^(PrimePi[#[[1]]] - 1) & /@ FactorInteger[n]]];
    A277892[n_] := PrimeOmega[A048675[n]];
    Module[{b}, b[_] = 0;
    a[n_] := If[n == 2, 0, With[{t = A277892[n]}, b[t] = b[t] + 1]]];
    Table[a[n], {n, 2, 101}] (* Jean-François Alcover, Jan 11 2022 *)
  • Scheme
    (definec (A277895 n) (cond ((<= n 2) 0) ((= 1 (A010051 n)) 1) (else (+ 1 (A277895 (A277894 n))))))

Formula

a(2)=0, for n >= 3, if A010051(n) = 1 [when n is a prime], a(n) = 1, otherwise a(n) = 1 + a(A277894(n)).
Showing 1-10 of 10 results.