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

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

A260442 Sequence A260443 sorted into ascending order.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 11, 13, 15, 17, 18, 19, 23, 29, 30, 31, 35, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 75, 77, 79, 83, 89, 90, 97, 101, 103, 105, 107, 109, 113, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 210, 211, 221, 223, 227, 229, 233, 239, 241, 245, 251, 257, 263, 269, 270, 271, 277, 281, 283, 293, 307, 311
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2015

Keywords

Comments

Each term is a prime factorization encoding of one of the Stern polynomials. See A260443 for details.
Numbers n for which A260443(A048675(n)) = n. - Antti Karttunen, Oct 14 2016

Crossrefs

Subsequence of A073491.
From 2 onward the positions of nonzeros in A277333.
Various subsequences: A000040, A002110, A070826, A277317, A277200 (even terms). Also all terms of A277318 are included here.
Cf. also A277323, A277324 and permutation pair A277415 & A277416.

Programs

  • PARI
    allocatemem(2^30);
    A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ Michel Marcus, Oct 10 2016
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From Michel Marcus
    A260443(n) = if(n<2, n+1, if(n%2, A260443(n\2)*A260443(n\2+1), A003961(A260443(n\2))));
    isA260442(n) = (A260443(A048675(n)) == n);  \\ The most naive version.
    A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])) \\ Charles R Greathouse IV, Apr 23 2015
    A061395(n) =  if(1==n, 0, primepi(vecmax(factor(n)[, 1]))); \\ After M. F. Hasler's code for A006530.
    isA260442(n) = ((1==n) || isprime(n) || ((omega(n) == 1+(A061395(n)-A055396(n))) && (A260443(A048675(n)) == n))); \\ Somewhat optimized.
    i=0; n=0; while(i < 10001, n++; if(isA260442(n), write("b260442.txt", i, " ", n); i++));
    \\ Antti Karttunen, Oct 14 2016
    
  • Python
    from sympy import factorint, prime, primepi
    from operator import mul
    from functools import reduce
    def a048675(n):
        F=factorint(n)
        return 0 if n==1 else sum([F[i]*2**(primepi(i) - 1) for i in F])
    def a003961(n):
        F=factorint(n)
        return 1 if n==1 else reduce(mul, [prime(primepi(i) + 1)**F[i] for i in F])
    def a(n): return n + 1 if n<2 else a003961(a(n//2)) if n%2==0 else a((n - 1)//2)*a((n + 1)//2)
    print([n for n in range(301) if a(a048675(n))==n]) # Indranil Ghosh, Jun 21 2017
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A260442 (FIXED-POINTS 0 1 (COMPOSE A260443 A048675)))
    ;; An optimized version:
    (define A260442 (MATCHING-POS 0 1 (lambda (n) (or (= 1 n) (= 1 (A010051 n)) (and (not (< (A001221 n) (+ 1 (A243055 n)))) (= n (A260443 (A048675 n))))))))
    ;; Antti Karttunen, Oct 14 2016
    

A277333 Left inverse of A260443, giving 0 as a result when n is outside of the range of A260443.

Original entry on oeis.org

0, 1, 2, 0, 4, 3, 8, 0, 0, 0, 16, 0, 32, 0, 6, 0, 64, 5, 128, 0, 0, 0, 256, 0, 0, 0, 0, 0, 512, 7, 1024, 0, 0, 0, 12, 0, 2048, 0, 0, 0, 4096, 0, 8192, 0, 0, 0, 16384, 0, 0, 0, 0, 0, 32768, 0, 0, 0, 0, 0, 65536, 0, 131072, 0, 0, 0, 0, 0, 262144, 0, 0, 0, 524288, 0, 1048576, 0, 10, 0, 24, 0, 2097152, 0, 0, 0, 4194304, 0, 0, 0, 0, 0, 8388608, 9
Offset: 1

Views

Author

Antti Karttunen, Oct 10 2016

Keywords

Examples

			a(1) = 0 because A260443(0) = 1. For n > 1, a(n) = 0 only if n does not occur in the range of A260443.
a(6) = 3 because A260443(3) = 6.
		

Crossrefs

Cf. A277316, A260442 (from 2 onward, the positions of nonzeros), A277317 (positions of primes).

Programs

Formula

If A260443(A048675(n)) = n, then a(n) = A048675(n), otherwise a(n) = 0.
Other identities. For all n >= 0:
a(A260443(n)) = n.
a(2n+1) = 2*a(A064989(2n+1)).
If a(2n) > 0 [by necessity an odd number in that case], then A005811((a(2n)-1)/2) = A007949(2n). [See comment in A277324.]

A277316 Prime-factorization representation of the prime-th Stern-polynomial: a(n) = A260443(A000040(n)).

Original entry on oeis.org

3, 6, 18, 30, 270, 450, 630, 6750, 9450, 22050, 2310, 3543750, 4961250, 53156250, 727650, 173643750, 25467750, 2668050, 40020750, 891371250, 9550406250, 1400726250, 3190703906250, 467969906250, 173423250, 16378946718750, 1715889656250, 245684200781250, 25738344843750, 8497739250, 510510, 6763506750, 66919696593750
Offset: 1

Views

Author

Antti Karttunen, Oct 10 2016

Keywords

Comments

If the conjecture by Ulas and Ulas is true, then all these terms can be found from A206284 and then this is also a subsequence of A277318.

Crossrefs

Cf. A277317 (same sequence sorted into ascending order) is a subsequence of A277319.
Differs from A277318 for the first time at n=10, where A277318(10) = 15750, a term which is missing from this sequence.

Programs

Formula

a(n) = A260443(A000040(n)).
Other identities.
For all n >= 1, a(A059305(n)) = A002110(A000043(n)).

A277200 Even terms in A260442 (in A260443).

Original entry on oeis.org

2, 6, 18, 30, 90, 210, 270, 450, 630, 2310, 6750, 6930, 9450, 15750, 20250, 22050, 30030, 47250, 90090, 330750, 510510, 727650, 1212750, 1531530, 1653750, 2668050, 3543750, 4961250, 8489250, 9699690, 18191250, 24806250, 25467750, 29099070, 40020750, 53156250, 57881250, 104053950, 173423250, 173643750
Offset: 1

Views

Author

Antti Karttunen, Oct 14 2016

Keywords

Comments

All odd terms larger > 1 in A260442 can be obtained from these terms by shifting their prime factorization some number of steps towards larger primes with A003961.

Crossrefs

Sequence A277324 sorted into ascending order.
Subsequence of A055932.
Cf. A002110, A277317 (subsequences, apart from their initial terms).
Also all terms of A277318 apart from initial 3 are included in this sequence.

Programs

Showing 1-5 of 5 results.