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.

Previous Showing 21-30 of 2208 results. Next

A285729 Compound filter: a(n) = T(A032742(n), A046523(n)), where T(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 2, 2, 12, 2, 31, 2, 59, 18, 50, 2, 142, 2, 73, 50, 261, 2, 199, 2, 220, 73, 131, 2, 607, 33, 166, 129, 314, 2, 961, 2, 1097, 131, 248, 73, 1396, 2, 295, 166, 923, 2, 1246, 2, 550, 340, 401, 2, 2509, 52, 655, 248, 692, 2, 1252, 131, 1303, 295, 590, 2, 3946, 2, 661, 517, 4497, 166, 1924, 2, 1024, 401, 2051, 2, 5707, 2, 898, 655, 1214, 131, 2317, 2, 3781, 888
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ {Sort[Flatten@ Apply[ TensorProduct, # /. {p_, e_} /; p > 1 :> p^Range[0, e]]][[-2]], Times @@ MapIndexed[Prime[First@ #2]^#1 &, Sort[#[[All, -1]], Greater]] - Boole[n == 1]} &@ FactorInteger@ n, {n, 81}] (* Michael De Vlieger, May 04 2017 *)
  • PARI
    A032742(n) = if(1==n,n,n/vecmin(factor(n)[,1]));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A285729(n) = (1/2)*(2 + ((A032742(n)+A046523(n))^2) - A032742(n) - 3*A046523(n));
    for(n=1, 10000, write("b285729.txt", n, " ", A285729(n)));
    
  • Python
    from sympy import divisors, factorint
    def a032742(n): return 1 if n==1 else max(divisors(n)[:-1])
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def P(n):
       f = factorint(n)
       return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a(n): return T(a032742(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A285729 n) (* (/ 1 2) (+ (expt (+ (A032742 n) (A046523 n)) 2) (- (A032742 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A032742(n)+A046523(n))^2) - A032742(n) - 3*A046523(n)).

A136302 Transform of A000027 by the T_{1,1} transformation (see link).

Original entry on oeis.org

2, 6, 15, 35, 81, 188, 437, 1016, 2362, 5491, 12765, 29675, 68986, 160373, 372822, 866706, 2014847, 4683951, 10888865, 25313540, 58846841, 136802308, 318026782, 739322571, 1718716457, 3995531011, 9288482690, 21593102505, 50197873146, 116695897118, 271285047567
Offset: 1

Views

Author

Richard Choulet, Mar 22 2008

Keywords

Crossrefs

Programs

  • Magma
    I:=[2,6,15]; [n le 3 select I[n] else 3*Self(n-1) -2*Self(n-2) +Self(n-3): n in [1..41]]; // G. C. Greubel, Apr 12 2021
    
  • Maple
    a:= n-> (<<6|2|1>>. <<3|1|0>, <-2|0|1>, <1|0|0>>^n)[1, 3]:
    seq(a(n), n=1..40);  # Alois P. Heinz, Aug 14 2008
  • Mathematica
    LinearRecurrence[{3,-2,1}, {2,6,15}, 41] (* G. C. Greubel, Apr 12 2021 *)
  • Sage
    def A136302_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(2+x^2)/(1-3*x+2*x^2-x^3) ).list()
    a=A136302_list(41); a[1:] # G. C. Greubel, Apr 12 2021

Formula

G.f.: z*(2 + z^2)/(1 - 3*z + 2*z^2 - z^3).
a(n+3) = 3*a(n+2) - 2*a(n+1) + a(n) (n>=0). - Richard Choulet, Apr 07 2009
a(n) = 2*A095263(n) + A095263(n-2). - R. J. Mathar, Feb 29 2016

Extensions

More terms from Alois P. Heinz, Aug 14 2008

A285722 Square array A(n,k) read by antidiagonals, A(n,n) = 0, otherwise, if n > k, A(n,k) = T(n-k,k), else A(n,k) = T(n,k-n), where T(n,k) is sequence A000027 considered as a two-dimensional table.

Original entry on oeis.org

0, 1, 1, 2, 0, 3, 4, 3, 2, 6, 7, 5, 0, 5, 10, 11, 8, 6, 4, 9, 15, 16, 12, 9, 0, 8, 14, 21, 22, 17, 13, 10, 7, 13, 20, 28, 29, 23, 18, 14, 0, 12, 19, 27, 36, 37, 30, 24, 19, 15, 11, 18, 26, 35, 45, 46, 38, 31, 25, 20, 0, 17, 25, 34, 44, 55, 56, 47, 39, 32, 26, 21, 16, 24, 33, 43, 54, 66, 67, 57, 48, 40, 33, 27, 0, 23, 32, 42, 53, 65, 78, 79, 68, 58, 49, 41, 34, 28, 22, 31, 41, 52, 64, 77, 91
Offset: 1

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

The array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Examples

			The top left 14 X 14 corner of the array:
   0,  1,  2,  4,  7, 11, 16, 22, 29, 37, 46, 56, 67, 79
   1,  0,  3,  5,  8, 12, 17, 23, 30, 38, 47, 57, 68, 80
   3,  2,  0,  6,  9, 13, 18, 24, 31, 39, 48, 58, 69, 81
   6,  5,  4,  0, 10, 14, 19, 25, 32, 40, 49, 59, 70, 82
  10,  9,  8,  7,  0, 15, 20, 26, 33, 41, 50, 60, 71, 83
  15, 14, 13, 12, 11,  0, 21, 27, 34, 42, 51, 61, 72, 84
  21, 20, 19, 18, 17, 16,  0, 28, 35, 43, 52, 62, 73, 85
  28, 27, 26, 25, 24, 23, 22,  0, 36, 44, 53, 63, 74, 86
  36, 35, 34, 33, 32, 31, 30, 29,  0, 45, 54, 64, 75, 87
  45, 44, 43, 42, 41, 40, 39, 38, 37,  0, 55, 65, 76, 88
  55, 54, 53, 52, 51, 50, 49, 48, 47, 46,  0, 66, 77, 89
  66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56,  0, 78, 90
  78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67,  0, 91
  91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79,  0
		

Crossrefs

Transpose: A285723.
Cf. A000124 (row 1, from 1 onward), A000217 (column 1).

Programs

  • Mathematica
    A[n_, n_] = 0;
    A[n_, k_] /; k == n-1 := (k^2 - k + 2)/2;
    A[1, k_] := (k^2 - 3k + 4)/2;
    A[n_, k_] /; 1 <= k <= n-2 := A[n, k] = A[n, k+1] + 1;
    A[n_, k_] /; k > n := A[n, k] = A[n-1, k] + 1;
    Table[A[n-k+1, k], {n, 1, 14}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Nov 19 2019 *)
  • Python
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def A(n, k): return 0 if n == k else T(n - k, k) if n>k else T(n, k - n)
    for n in range(1, 21): print([A(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, May 03 2017
  • Scheme
    (define (A285722 n) (A285722bi (A002260 n) (A004736 n)))
    (define (A285722bi row col) (cond ((= row col) 0) ((> row col) (A000027bi (- row col) col)) (else (A000027bi row (- col row)))))
    (define (A000027bi row col) (* (/ 1 2) (+ (expt (+ row col) 2) (- row) (- (* 3 col)) 2)))
    

Formula

If n = k, A(n,k) = 0, if n > k, A(n,k) = T(n-k,k), otherwise [when n < k], A(n,k) = T(n,k-n), where T(n,k) is sequence A000027 considered as a two-dimensional table, that is, as a pairing function from N X N to N.

A285732 Square array A(n,k) read by antidiagonals, A(n,n) = -n, otherwise, if n > k, A(n,k) = T(n-k,k), else A(n,k) = T(n,k-n), where T(n,k) is sequence A000027 considered as a two-dimensional table.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

The array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Examples

			The top left 14 X 14 corner of the array:
  -1,  1,  2,  4,  7, 11, 16, 22, 29,  37,  46,  56,  67,  79
   1, -2,  3,  5,  8, 12, 17, 23, 30,  38,  47,  57,  68,  80
   3,  2, -3,  6,  9, 13, 18, 24, 31,  39,  48,  58,  69,  81
   6,  5,  4, -4, 10, 14, 19, 25, 32,  40,  49,  59,  70,  82
  10,  9,  8,  7, -5, 15, 20, 26, 33,  41,  50,  60,  71,  83
  15, 14, 13, 12, 11, -6, 21, 27, 34,  42,  51,  61,  72,  84
  21, 20, 19, 18, 17, 16, -7, 28, 35,  43,  52,  62,  73,  85
  28, 27, 26, 25, 24, 23, 22, -8, 36,  44,  53,  63,  74,  86
  36, 35, 34, 33, 32, 31, 30, 29, -9,  45,  54,  64,  75,  87
  45, 44, 43, 42, 41, 40, 39, 38, 37, -10,  55,  65,  76,  88
  55, 54, 53, 52, 51, 50, 49, 48, 47,  46, -11,  66,  77,  89
  66, 65, 64, 63, 62, 61, 60, 59, 58,  57,  56, -12,  78,  90
  78, 77, 76, 75, 74, 73, 72, 71, 70,  69,  68,  67, -13,  91
  91, 90, 89, 88, 87, 86, 85, 84, 83,  82,  81,  80,  79, -14
		

Crossrefs

Transpose: A285733.
Cf. A000124 (row 1, after -1), A000217 (column 1, after -1).

Programs

  • Python
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def A(n, k): return -n if n == k else T(n - k, k) if n>k else T(n, k - n)
    for n in range(1, 21): print([A(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, May 03 2017
  • Scheme
    (define (A285732 n) (A285732bi (A002260 n) (A004736 n)))
    (define (A285732bi row col) (cond ((= row col) (- row)) ((> row col) (A000027bi (- row col) col)) (else (A000027bi row (- col row)))))
    

Formula

If n = k, A(n,k) = -n, if n > k, A(n,k) = T(n-k,k), otherwise [when n < k], A(n,k) = T(n,k-n), where T(n,k) is sequence A000027 considered as a two-dimensional table, that is, as a pairing function from N X N to N.
A(n,k) = A285722(n,k) - A286100(n,k).

A286142 Compound filter: a(n) = T(A257993(n), A046523(n)), where T(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 2, 12, 2, 31, 2, 38, 7, 23, 2, 94, 2, 23, 16, 138, 2, 94, 2, 80, 16, 23, 2, 328, 7, 23, 29, 80, 2, 532, 2, 530, 16, 23, 16, 706, 2, 23, 16, 302, 2, 499, 2, 80, 67, 23, 2, 1228, 7, 80, 16, 80, 2, 328, 16, 302, 16, 23, 2, 1957, 2, 23, 67, 2082, 16, 499, 2, 80, 16, 467, 2, 2704, 2, 23, 67, 80, 16, 499, 2, 1178, 121, 23, 2, 1894, 16, 23, 16, 302, 2, 1957, 16
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Differs from A286143 for the first time at n=24, where a(24) = 328, while A286143(24) = 355.

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 - Boole[n == 1] & @@ {Module[{i = 1}, While[! CoprimeQ[Prime@ i, n], i++]; i], Times @@ MapIndexed[ Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]]}, {n, 92}] (* Michael De Vlieger, May 04 2017 *)
  • PARI
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A257993(n) = { for(i=1,n,if(n%prime(i),return(i))); }
    A286142(n) = (1/2)*(2 + ((A257993(n)+A046523(n))^2) - A257993(n) - 3*A046523(n));
    for(n=1, 10000, write("b286142.txt", n, " ", A286142(n)));
    
  • Python
    from sympy import factorint, prime, primepi, gcd
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a053669(n):
        x=1
        while True:
            if gcd(prime(x), n) == 1: return prime(x)
            else: x+=1
    def a257993(n): return primepi(a053669(n))
    def a(n): return T(a257993(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286142 n) (* (/ 1 2) (+ (expt (+ (A257993 n) (A046523 n)) 2) (- (A257993 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A257993(n)+A046523(n))^2) - A257993(n) - 3*A046523(n)).

A190405 Decimal expansion of Sum_{k>=1} (1/2)^T(k), where T=A000217 (triangular numbers); based on column 1 of the natural number array, A000027.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

See A190404.
Binary expansion is .1010010001... (A023531). - Rick L. Shepherd, Jan 05 2014
From Amiram Eldar, Dec 07 2020: (Start)
This constant is not a quadratic irrational (Duverney, 1995).
The Engel expansion of this constant are the powers of 2 (A000079) above 1. (End)

Examples

			0.64163256065515386629...
		

Crossrefs

A190404: (1/2)(1 + Sum_{k>=1} (1/2)^T(k)), where T = A000217 (triangular numbers).
A190405: Sum_{k>=1} (1/2)^T(k), where T = A000217 (triangular numbers).
A190406: Sum_{k>=1} (1/2)^S(k-1), where S = A001844 (centered square numbers).
A190407: Sum_{k>=1} (1/2)^V(k), where V = A058331 (1 + 2*k^2).
Cf. A000079.

Programs

  • Mathematica
    RealDigits[EllipticTheta[2, 0, 1/Sqrt[2]]/2^(7/8) - 1, 10, 120] // First (* Jean-François Alcover, Feb 12 2013 *)
    RealDigits[Total[(1/2)^Accumulate[Range[50]]],10,120][[1]] (* Harvey P. Dale, Oct 18 2013 *)
    (* See also A190404 *)
  • PARI
    th2(x)=2*x^.25 + 2*suminf(n=1,x^(n+1/2)^2)
    th2(sqrt(.5))/2^(7/8)-1 \\ Charles R Greathouse IV, Jun 06 2016
  • Sage
    def A190405(b):  # Generate the constant with b bits of precision
        return N(sum([(1/2)^(j*(j+1)/2) for j in range(1,b)]),b)
    A190405(409) # Danny Rorabaugh, Mar 25 2015
    

A286101 Square array A(n,k) read by antidiagonals: A(n,k) = T(gcd(n,k), lcm(n,k)), where T(n,k) is sequence A000027 considered as a two-dimensional table.

Original entry on oeis.org

1, 2, 2, 4, 5, 4, 7, 16, 16, 7, 11, 12, 13, 12, 11, 16, 46, 67, 67, 46, 16, 22, 23, 106, 25, 106, 23, 22, 29, 92, 31, 191, 191, 31, 92, 29, 37, 38, 211, 80, 41, 80, 211, 38, 37, 46, 154, 277, 379, 436, 436, 379, 277, 154, 46, 56, 57, 58, 59, 596, 61, 596, 59, 58, 57, 56, 67, 232, 436, 631, 781, 862, 862, 781, 631, 436, 232, 67, 79, 80, 529, 212, 991, 302, 85, 302, 991, 212, 529, 80, 79
Offset: 1

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

The array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Examples

			The top left 12 X 12 corner of the array:
   1,   2,   4,   7,   11,   16,   22,   29,   37,   46,   56,   67
   2,   5,  16,  12,   46,   23,   92,   38,  154,   57,  232,   80
   4,  16,  13,  67,  106,   31,  211,  277,   58,  436,  529,   94
   7,  12,  67,  25,  191,   80,  379,   59,  631,  212,  947,  109
  11,  46, 106, 191,   41,  436,  596,  781,  991,   96, 1486, 1771
  16,  23,  31,  80,  436,   61,  862,  302,  193,  467, 2146,  142
  22,  92, 211, 379,  596,  862,   85, 1541, 1954, 2416, 2927, 3487
  29,  38, 277,  59,  781,  302, 1541,  113, 2557,  822, 3829,  355
  37, 154,  58, 631,  991,  193, 1954, 2557,  145, 4006, 4852,  706
  46,  57, 436, 212,   96,  467, 2416,  822, 4006,  181, 5996, 1832
  56, 232, 529, 947, 1486, 2146, 2927, 3829, 4852, 5996,  221, 8647
  67,  80,  94, 109, 1771,  142, 3487,  355,  706, 1832, 8647,  265
		

Crossrefs

Cf. A000124 (row 1 and column 1), A001844 (main diagonal).

Programs

Formula

A(n,k) = T(gcd(n,k), lcm(n,k)), where T(n,k) is sequence A000027 considered as a two-dimensional table, that is, as a pairing function from N x N to N.
A(n,k) = A(k,n), or equivalently, a(A038722(n)) = a(n). [Array is symmetric.]

A286143 Compound filter: a(n) = T(A055881(n), A046523(n)), where T(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 2, 12, 2, 31, 2, 38, 7, 23, 2, 94, 2, 23, 16, 138, 2, 94, 2, 80, 16, 23, 2, 355, 7, 23, 29, 80, 2, 499, 2, 530, 16, 23, 16, 706, 2, 23, 16, 302, 2, 499, 2, 80, 67, 23, 2, 1279, 7, 80, 16, 80, 2, 328, 16, 302, 16, 23, 2, 1894, 2, 23, 67, 2082, 16, 499, 2, 80, 16, 467, 2, 2779, 2, 23, 67, 80, 16, 499, 2, 1178, 121, 23, 2, 1894, 16, 23, 16, 302, 2, 1894, 16
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Differs from A286142 for the first time at n=24, where a(24) = 355, while A286142(24) = 328.

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 - Boole[n == 1] & @@ {Module[{m = 1}, While[Mod[n, m!] == 0, m++]; m - 1], Times @@ MapIndexed[ Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]]}, {n, 92}] (* Michael De Vlieger, May 04 2017, after Robert G. Wilson v at A055881 *)
  • PARI
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A055881(n) = { my(i); i=2; while((0 == (n%i)), n = n/i; i++); return(i-1); }
    A286143(n) = (1/2)*(2 + ((A055881(n)+A046523(n))^2) - A055881(n) - 3*A046523(n));
    for(n=1, 10000, write("b286143.txt", n, " ", A286143(n)));
    
  • Python
    from sympy import factorial, factorint
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a055881(n):
        m = 1
        while n%factorial(m)==0:
            m+=1
        return m - 1
    def a(n): return T(a055881(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286143 n) (* (/ 1 2) (+ (expt (+ (A055881 n) (A046523 n)) 2) (- (A055881 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A055881(n)+A046523(n))^2) - A055881(n) - 3*A046523(n)).

A286356 Compound filter: a(n) = P(A061395(n), A046523(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

0, 2, 5, 7, 9, 23, 14, 29, 12, 31, 20, 80, 27, 40, 31, 121, 35, 80, 44, 94, 40, 50, 54, 302, 18, 61, 38, 109, 65, 499, 77, 497, 50, 73, 40, 668, 90, 86, 61, 328, 104, 532, 119, 125, 94, 100, 135, 1178, 25, 94, 73, 142, 152, 302, 50, 355, 86, 115, 170, 1894, 189, 131, 109, 2017, 61, 566, 209, 160, 100, 532, 230, 2630, 252, 148, 94, 179, 50, 601, 275, 1228, 138
Offset: 1

Views

Author

Antti Karttunen, May 09 2017

Keywords

Crossrefs

Programs

  • PARI
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1]))); \\ After M. F. Hasler's code for A006530.
    A286356(n) = (2 + ((A061395(n)+A046523(n))^2) - A061395(n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286356.txt", n, " ", A286356(n)));
    
  • Python
    from sympy import factorint
    from operator import mul
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a061395(n): return 0 if n == 1 else primepi(max(primefactors(n)))
    def a(n): return T(a061395(n), a046523(n)) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286356 n) (* (/ 1 2) (+ (expt (+ (A061395 n) (A046523 n)) 2) (- (A061395 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A061395(n)+A046523(n))^2) - A061395(n) - 3*A046523(n)).

A286364 Compound filter: a(n) = P(A286361(n), A286363(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 2, 1, 7, 3, 2, 2, 3, 2, 5, 1, 3, 7, 2, 3, 16, 2, 2, 2, 10, 3, 29, 2, 3, 5, 2, 1, 16, 3, 5, 7, 3, 2, 5, 3, 3, 16, 2, 2, 12, 2, 2, 2, 7, 10, 5, 3, 3, 29, 5, 2, 16, 3, 2, 5, 3, 2, 67, 1, 21, 16, 2, 3, 16, 5, 2, 7, 3, 3, 14, 2, 16, 5, 2, 3, 121, 3, 2, 16, 21, 2, 5, 2, 3, 12, 5, 2, 16, 2, 5, 2, 3, 7, 67, 10, 3, 5, 2, 3, 23, 3, 2, 29, 3, 5, 5, 2, 3
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Comments

This sequence packs the values of A286361(n) and A286363(n) to a single value with the pairing function A000027. These two components essentially give the prime signature of 4k+1 part and the prime signature of 4k+3 part, and they can be accessed from a(n) with functions A002260 and A004736. For example, A004431 lists all such numbers that the first component is larger than one and the second component is a perfect square.

Crossrefs

Programs

  • Python
    from sympy import factorint
    from operator import mul
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def A(n, k):
        f = factorint(n)
        return 1 if n == 1 else reduce(mul, [1 if i%4==k else i**f[i] for i in f])
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3))) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286364 n) (* (/ 1 2) (+ (expt (+ (A286361 n) (A286363 n)) 2) (- (A286361 n)) (- (* 3 (A286363 n))) 2)))
    

Formula

a(n) = (1/2)*(2+((A286361(n)+A286363(n))^2) - A286361(n) - 3*A286363(n)).
Other identities. For all n >= 1:
a(A267099(n)) = A038722(a(n)).
Previous Showing 21-30 of 2208 results. Next