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

A290865 a(n) = number of regions in the configuration A290447(n).

Original entry on oeis.org

0, 1, 3, 7, 15, 30, 56, 98, 161, 250, 370, 536, 748, 1027, 1379, 1807, 2320, 2954, 3702, 4604, 5652, 6852, 8239, 9858, 11683, 13748, 16086, 18700, 21604, 24887, 28471, 32491, 36907, 41751, 47080, 52876, 59105, 65965, 73440, 81521, 90176
Offset: 1

Views

Author

David Applegate, Aug 12 2017

Keywords

Examples

			With 3 points, there are 3 semicircles above the baseline, which bound a(3) = 3 regions. With 4 points, there are 6 semicircles, defining 7 regions (use the Halser webpage with n = 3 and 4). - _N. J. A. Sloane_, Aug 12 2017
		

Crossrefs

Cf. A290447, A290866, A290867, A332723 (number of regions with k edges).
See also A290876.

A290866 a(n) = number of segments (edges) in the configuration A290447(n).

Original entry on oeis.org

0, 1, 3, 8, 20, 45, 91, 168, 285, 450, 670, 981, 1375, 1902, 2568, 3371, 4326, 5522, 6927, 8639, 10624, 12882, 15489, 18559, 22006, 25904, 30321, 35254, 40728, 46959, 53721, 61354, 69734, 78917, 89029, 100018, 111758, 124759, 138943
Offset: 1

Views

Author

David Applegate, Aug 12 2017

Keywords

Comments

Only edges above the line are counted. Total edges = a(n) + n - 1.

Crossrefs

Formula

a(n) = A290447(n) + A290865(n).

A290867 Irregular triangle read by rows: the number of points that are the intersections of k semicircles in the configuration A290447(n).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 5, 0, 15, 0, 35, 0, 70, 0, 123, 1, 0, 195, 5, 0, 285, 15, 0, 420, 25, 0, 586, 39, 2, 0, 818, 53, 4, 0, 1110, 73, 6, 0, 1451, 103, 10, 0, 1846, 142, 18, 0, 2361, 181, 26, 0, 2956, 234, 33, 2, 0, 3704, 287, 40, 4, 0, 4567, 348, 49, 8
Offset: 1

Views

Author

David Applegate, Aug 12 2017

Keywords

Comments

Row lengths are A290726(n).
The first entry of each row is 0, because an intersection requires at least 2 lines.
The first row with 3 entries is for n=9, because that is the first configuration with a nontrivial intersection.
Row sums give A290447.

Examples

			Triangle begins:
  0;
  0;
  0;
  0,   1;
  0,   5;
  0,  15;
  0,  35;
  0,  70;
  0, 123,   1;
  0, 195,   5;
  0, 285,  15;
  0, 420,  25;
  0, 586,  39,   2;
		

Crossrefs

Formula

Sum_{k} T(n,k) * binomial(k,2) = binomial(n,4), because there are binomial(n,4) total pairs of semicircles, and an intersection of k consists of binomial(k,2) of those pairs.
A290865(n) = binomial(n,2) + Sum_{k} T(n,k) * (k-1).

A332723 Irregular table read by rows: Take a line with n equally spaced points with semicircles drawn between them, as in A290447. Then T(n,k) = number of k-sided regions in that figure, where k>=2.

Original entry on oeis.org

1, 2, 1, 3, 4, 4, 10, 0, 1, 5, 19, 3, 3, 6, 31, 13, 6, 7, 46, 35, 10, 8, 65, 74, 14, 9, 92, 131, 18, 10, 140, 192, 27, 1, 11, 202, 274, 46, 3, 12, 275, 396, 62, 3, 13, 363, 563, 79, 9, 14, 467, 784, 100, 14, 15, 598, 1054, 126, 12, 2
Offset: 2

Views

Author

Keywords

Examples

			The first 25 rows are:
1;
2,1;
3,4;
4,10,0,1;
5,19,3,3;
6,31,13,6;
7,46,35,10;
8,65,74,14;
9,92,131,18;
10,140,192,27,1;
11,202,274,46,3;
12,275,396,62,3;
13,363,563,79,9;
14,467,784,100,14;
15,598,1054,126,12,2;
16,772,1358,159,13,2;
17,996,1698,216,24,2,1;
18,1255,2120,266,41,2;
19,1551,2629,346,54,5;
20,1892,3236,425,71,8;
21,2304,3909,525,83,9,1;
22,2793,4676,629,108,9,2;
23,3342,5559,792,125,14,3;
24,3982,6546,948,166,15,2;
25,4705,7658,1145,198,14,3;
The row sums are A290865.
		

Crossrefs

A290726 a(n) = maximal number of semicircles that pass through an intersection point in the configuration A290447(n).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12
Offset: 1

Views

Author

N. J. A. Sloane, Aug 10 2017

Keywords

Crossrefs

Cf. A290447.

Extensions

More terms from Chai Wah Wu, Aug 10 2017

A290461 Binomial(n,4) - A290447(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 2, 10, 30, 50, 88, 126, 176, 256, 374, 492, 651, 810, 1013, 1285, 1605, 1925, 2327, 2794, 3315, 3921, 4627, 5333, 6215, 7097, 8093, 9210, 10411, 11763, 13392, 15021, 16748, 18649, 20833, 23017, 25480, 27943, 30634, 33656, 36806, 39956, 43478, 47215, 51266, 55565, 60168
Offset: 1

Views

Author

N. J. A. Sloane, Aug 07 2017

Keywords

Comments

Binomial(n,4) is an upper bound on A290447. No formula or recurrence is known for the latter, but perhaps the differences will turn out to be simpler to analyze.

Crossrefs

A290465 a(n) = A006561(n) - A290447(n).

Original entry on oeis.org

0, 0, 0, 0, 0, -2, 0, -21, 2, -39, 30, -144, 88, -118, 176, -187, 374, -731, 651, -194, 1013, -89, 1605, -1404, 2327, 325, 3315, 695, 4627, -5271, 6215, 2050, 8093, 3091, 10411, -161, 13392, 6187, 16748, 8140, 20833, -4072, 25480, 13633, 30634, 17212, 36806, 9537, 43478, 25716, 51266, 31113, 60168
Offset: 1

Views

Author

N. J. A. Sloane, Aug 09 2017

Keywords

Comments

A006561 and A290447 are closely related problems. The former is well-understood, while the latter is at present a mystery.

Crossrefs

A292103 Number of points that are the intersections of exactly two semicircles in the configuration A290447(n).

Original entry on oeis.org

0, 0, 0, 1, 5, 15, 35, 70, 123, 195, 285, 420, 586, 818, 1110, 1451, 1846, 2361, 2956, 3704, 4567, 5530, 6631, 7963, 9443, 11113, 13005, 15111, 17450, 20167, 23064, 26396, 30053, 34046, 38447, 43230, 48245, 53890, 60061, 66703, 73713, 81503, 89746
Offset: 1

Views

Author

N. J. A. Sloane, Sep 14 2017

Keywords

Comments

No formula or recurrence is known.
Needs a b-file (A290867 gives first 100 terms).

Crossrefs

Column k=2 of triangle in A290867.

A037274 Home primes: for n >= 2, a(n) = the prime that is finally reached when you start with n, concatenate its prime factors (A037276) and repeat until a prime is reached (a(n) = -1 if no prime is ever reached).

Original entry on oeis.org

1, 2, 3, 211, 5, 23, 7, 3331113965338635107, 311, 773, 11, 223, 13, 13367, 1129, 31636373, 17, 233, 19, 3318308475676071413, 37, 211, 23, 331319, 773, 3251, 13367, 227, 29, 547, 31, 241271, 311, 31397, 1129, 71129, 37, 373, 313, 3314192745739, 41, 379, 43, 22815088913, 3411949, 223, 47, 6161791591356884791277
Offset: 1

Views

Author

Keywords

Comments

The initial 1 could have been omitted.
Probabilistic arguments give exactly zero for the chance that the sequence of integers starting at n contains no prime, the expected number of primes being given by a divergent sequence. - J. H. Conway
After over 100 iterations, a(49) is still composite - see A056938 for the latest information.
More terms:
a(50) to a(60) are 3517, 317, 2213, 53, 2333, 773, 37463, 1129, 229, 59, 35149;
a(61) to a(65) are 61, 31237, 337, 1272505013723, 1381321118321175157763339900357651;
a(66) to a(76) are 2311, 67, 3739, 33191, 257, 71, 1119179, 73, 379, 571, 333271.
This is different from A195264. Here 8 = 2^3 -> 222 -> ... -> 3331113965338635107 (a prime), whereas in A195264 8 = 2^3 -> 23 (a prime). - N. J. A. Sloane, Oct 12 2014

Examples

			9 = 3*3 -> 33 = 3*11 -> 311, prime, so a(9) = 311.
The trajectory of 8 is more interesting:
8 ->
2 * 2 * 2 ->
2 * 3 * 37 ->
3 * 19 * 41 ->
3 * 3 * 3 * 7 * 13 * 13 ->
3 * 11123771 ->
7 * 149 * 317 * 941 ->
229 * 31219729 ->
11 * 2084656339 ->
3 * 347 * 911 * 118189 ->
11 * 613 * 496501723 ->
97 * 130517 * 917327 ->
53 * 1832651281459 ->
3 * 3 * 3 * 11 * 139 * 653 * 3863 * 5107
and 3331113965338635107 is prime, so a(8) = 3331113965338635107.
		

References

  • Jeffrey Heleen, Family Numbers: Mathemagical Black Holes, Recreational and Educational Computing, 5:5, pp. 6, 1990.
  • Jeffrey Heleen, Family numbers: Constructing Primes by Prime Factor Splicing, J. Recreational Math., Vol. 28 #2, 1996-97, pp. 116-119.

Crossrefs

Cf. A195264 (use exponents instead of repeating primes).
Cf. A084318 (use only one copy of each prime), A248713 (Fermi-Dirac analog: use unique representation of n>1 as a product of distinct terms of A050376).
Cf. also A120716 and related sequences.

Programs

  • Maple
    b:= n-> parse(cat(sort(map(i-> i[1]$i[2], ifactors(n)[2]))[])):
    a:= n-> `if`(isprime(n) or n=1, n, a(b(n))):
    seq(a(n), n=1..48);  # Alois P. Heinz, Jan 09 2021
  • Mathematica
    f[n_] := FromDigits@ Flatten[ IntegerDigits@ Table[ #[[1]], { #[[2]] }] & /@ FactorInteger@n, 2]; g[n_] := NestWhile[ f@# &, n, !PrimeQ@# &]; g[1] = 1; Array[g, 41] (* Robert G. Wilson v, Sep 22 2007 *)
  • PARI
    step(n)=my(f=factor(n),s="");for(i=1,#f~,for(j=1,f[i,2],s=Str(s,f[i,1]))); eval(s)
    a(n)=if(n<4,return(n)); while(!isprime(n), n=step(n)); n \\ Charles R Greathouse IV, May 14 2015
    
  • Python
    from sympy import factorint, isprime
    def f(n): return int("".join(str(p)*e for p, e in factorint(n).items()))
    def a(n):
        if n == 1: return 1
        fn = n
        while not isprime(fn): fn = f(fn)
        return fn
    print([a(n) for n in range(1, 40)]) # Michael S. Branicky, Jul 11 2022
  • SageMath
    def digitLen(x,n):
        r=0
        while(x>0):
            x//=n
            r+=1
        return r
    def concatPf(x,n):
        r=0
        f=list(factor(x))
        for c in range(len(f)):
            for d in range(f[c][1]):
                r*=(n**digitLen(f[c][0],n))
                r+=f[c][0]
        return r
    def hp(x,n):
        x1=concatPf(x,n)
        while(x1!=x):
            x=x1
            x1=concatPf(x1,n)
        return x
    #example: prints the home prime of 8 in base 10
    print(hp(8,10))
    

Extensions

Corrected and extended by Karl W. Heuer, Sep 30 2003

A006561 Number of intersections of diagonals in the interior of a regular n-gon.

Original entry on oeis.org

0, 0, 0, 1, 5, 13, 35, 49, 126, 161, 330, 301, 715, 757, 1365, 1377, 2380, 1837, 3876, 3841, 5985, 5941, 8855, 7297, 12650, 12481, 17550, 17249, 23751, 16801, 31465, 30913, 40920, 40257, 52360, 46981, 66045, 64981, 82251, 80881, 101270, 84841, 123410, 121441
Offset: 1

Views

Author

N. J. A. Sloane, Bjorn Poonen (poonen(AT)math.princeton.edu)

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Sequences related to chords in a circle: A001006, A054726, A006533, A006561, A006600, A007569, A007678. See also entries for chord diagrams in Index file.
See also A101363, A292104, A292105.
See A290447 for an analogous problem on a line.

Programs

  • Maple
    delta:=(m,n) -> if (n mod m) = 0 then 1 else 0; fi;
    f:=proc(n) global delta;
    if n <= 2 then 0 else \
    binomial(n,4)  \
    + (-5*n^3 + 45*n^2 - 70*n + 24)*delta(2,n)/24 \
    - (3*n/2)*delta(4,n) \
    + (-45*n^2 + 262*n)*delta(6,n)/6  \
    + 42*n*delta(12,n) \
    + 60*n*delta(18,n) \
    + 35*n*delta(24,n) \
    - 38*n*delta(30,n) \
    - 82*n*delta(42,n) \
    - 330*n*delta(60,n) \
    - 144*n*delta(84,n) \
    - 96*n*delta(90,n) \
    - 144*n*delta(120,n) \
    - 96*n*delta(210,n); fi; end;
    [seq(f(n),n=1..100)]; # N. J. A. Sloane, Aug 09 2017
  • Mathematica
    del[m_,n_]:=If[Mod[n,m]==0,1,0]; Int[n_]:=If[n<4, 0, Binomial[n,4] + del[2,n](-5n^3+45n^2-70n+24)/24 - del[4,n](3n/2) + del[6,n](-45n^2+262n)/6 + del[12,n]*42n + del[18,n]*60n + del[24,n]*35n - del[30,n]*38n - del[42,n]*82n - del[60,n]*330n - del[84,n]*144n - del[90,n]*96n - del[120,n]*144n - del[210,n]*96n]; Table[Int[n], {n,1,1000}] (* T. D. Noe, Dec 21 2006 *)
  • PARI
    apply( {A006561(n)=binomial(n,4)+if(n%2==0, (n>2) + (-5*n^2+45*n-70)*n/24 + vecsum([t[2] | t<-[4,6,12,18,24,30,42,60,84,90,120,210;-3/2,(262-45*n)/6,42,60,35,-38,-82,-330,-144,-96,-144,-96], n%t[1]==0])*n)}, [1..44]) \\ M. F. Hasler, Aug 23 2017, edited Aug 06 2021
    
  • Python
    def d(n,m): return not n % m
    def A006561(n): return 0 if n == 2 else n*(42*d(n,12) - 144*d(n,120) + 60*d(n,18) - 96*d(n,210) + 35*d(n,24)- 38*d(n,30) - 82*d(n,42) - 330*d(n,60) - 144*d(n,84) - 96*d(n,90)) + (n**4 - 6*n**3 + 11*n**2 - 6*n -d(n,2)*(5*n**3 - 45*n**2 + 70*n - 24) - 36*d(n,4)*n - 4*d(n,6)*n*(45*n - 262))//24 # Chai Wah Wu, Mar 08 2021

Formula

Let delta(m,n) = 1 if m divides n, otherwise 0.
For n >= 3, a(n) = binomial(n,4) + (-5*n^3 + 45*n^2 - 70*n + 24)*delta(2,n)/24
- (3*n/2)*delta(4,n) + (-45*n^2 + 262*n)*delta(6,n)/6 + 42*n*delta(12,n)
+ 60*n*delta(18,n) + 35*n*delta(24,n) - 38*n*delta(30,n)
- 82*n*delta(42,n) - 330*n*delta(60,n) - 144*n*delta(84,n)
- 96*n*delta(90,n) - 144*n*delta(120,n) - 96*n*delta(210,n). [Poonen and Rubinstein, Theorem 1] - N. J. A. Sloane, Aug 09 2017
For odd n, a(n) = binomial(n,4) = n*(n-1)*(n-2)*(n-3)/24, see A053126. For even n, use this formula, but then subtract 2 for every 3-crossing, subtract 5 for every 4-crossing, subtract 9 for every 5-crossing, etc. The number to be subtracted for a d-crossing is (d-1)*(d-2)/2. - Graeme McRae, Dec 26 2004
a(n) = A007569(n) - n. - T. D. Noe, Dec 23 2006
a(2n+5) = A053126(n+4). - Philippe Deléham, Jun 07 2013
Showing 1-10 of 35 results. Next