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.

User: Michael Turniansky

Michael Turniansky's wiki page.

Michael Turniansky has authored 11 sequences. Here are the ten most recent ones:

A339412 a(n) = floor(x(n)) where x(n) = (frac(x(n-1))+1)*floor(x(n-1)) and x(1) = Pi.

Original entry on oeis.org

3, 3, 4, 5, 5, 7, 10, 10, 13, 17, 31, 35, 67, 123, 223, 305, 414, 822, 1550, 2224, 3273, 4560, 7804, 14372, 15493, 20080, 40039, 44226, 71916, 130773, 183760, 316165, 613602, 1066559, 1138668, 1202427, 2022144, 2251837, 2477524, 4479491, 7192184, 11256849
Offset: 1

Author

Michael Turniansky, Dec 03 2020

Keywords

Comments

Inspired by A249270.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=1, Pi,
          (f-> (frac(f)+1)*floor(f))(b(n-1)))
        end:
    a:= n-> floor(b(n)):
    seq(a(n), n=1..50);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    Block[{a = {Pi}, $MaxExtraPrecision = 10^3}, Do[AppendTo[a, (FractionalPart[#] + 1) Floor[#]] &@ a[[-1]], 41]; Floor /@ a] (* Michael De Vlieger, Dec 04 2020 *)
  • NARS2000
    {(⌊{(⌊⍵)×1+1|⍵}⍣⍵)○1x}¨0,⍳100
    
  • PARI
    lista(nn) = {localprec(500); my(vx = vector(nn)); vx[1] = Pi; for (n=2, nn, vx[n] = (frac(vx[n-1])+1)*floor(vx[n-1]);); apply(floor, vx);} \\ Michel Marcus, Dec 03 2020

A304011 Number of same-sized pairs of subsets of set of n numbers that might have the same sum.

Original entry on oeis.org

0, 0, 0, 1, 5, 20, 70, 231, 735, 2289, 7029, 21384, 64636, 194480, 583232, 1744847, 5210687, 15540023, 46299143, 137837666, 410127806, 1219804541, 3626853647, 10781440394, 32045015650, 95236794600, 283027305300, 841096898745, 2499595030581, 7428627412260
Offset: 1

Author

Michael Turniansky, Jul 03 2018

Keywords

Comments

Given a set with n different numbers, you only need to check a(n) pairs of subsets of the same cardinality to prove that no pair of same-cardinality subsets have the same total sum. The others can be eliminated by noting the dominance of members of one totally-ordered subset over the corresponding elements of the other totally-ordered subset.

Crossrefs

Cf. A002054.

Programs

  • Mathematica
    Table[1/2 + Hypergeometric2F1[(1 - n)/2, -n/2, 1, 4]/2 - Hypergeometric2F1[(1 - n)/2, -n/2, 2, 4], {n, 1, 30}] (* Vaclav Kotesovec, Aug 04 2018 *)
    Join[{0,0,0,1},RecurrenceTable[{(n-4)*(n+2)*a[n]==(3*n^2-7*n-5)*a[n-1]+ (n-3)*(n-1)*a[n-2]-3*(n-2)*(n-1)*a[n-3],a[2]==0,a[3]==0,a[4]==1},a,{n,5,25}]] (* Georg Fischer, Dec 06 2019 *)
  • PARI
    a(n) = sum(i=1, n\2, binomial(n, 2*i)*binomial(2*i-1, i-2)); \\ Michel Marcus, Jul 04 2018

Formula

a(n) = Sum_{i=1..floor(n/2)} binomial(n, 2*i)*A002054(i-1).
From Vaclav Kotesovec, Aug 04 2018: (Start)
D-finite with recurrence: (n-4)*(n+2)*a(n) = (3*n^2 - 7*n - 5)*a(n-1) + (n-3)*(n-1)*a(n-2) - 3*(n-2)*(n-1)*a(n-3) for n >= 5.
a(n) ~ 3^(n + 1/2) / (4*sqrt(Pi*n)). (End)

Extensions

a(23) corrected by Georg Fischer, Dec 06 2019

A270004 Run-length encoding of iterated Scrabble function.

Original entry on oeis.org

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

Author

Michael Turniansky, Jul 24 2017

Keywords

Comments

Number of identical consecutive integers in A290205.

Crossrefs

Programs

  • Python
    from num2words import num2words
    tp = {"aeilnorstu": 1, "dg": 2, "bcmp":3, "fhvwy":4, "k":5, "jx":8, "qz":10}
    def pts(c): return ([tp[s] for s in tp if c in s]+[0])[0]
    def A113172(n): return sum(map(pts, num2words(n).replace(" and", "")))
    def A290205(n):
        while n not in {12, 4, 7, 8, 9}: n = A113172(n)
        return 12 if n == 12 else 4
    def aupton(terms):
        alst, prev, k, rl = [], A290205(0), 1, 1
        while len(alst) < terms:
            while A290205(k) == prev: k += 1; rl += 1
            alst.append(rl); rl = 0; prev = 12 if prev == 4 else 4
        return alst
    print(aupton(105)) # Michael S. Branicky, Dec 01 2021

A290205 Group identifier of iterated Scrabble function.

Original entry on oeis.org

4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 12, 4, 4, 4, 4, 12, 12, 4, 12, 4, 12, 12, 4, 12, 12, 12, 4, 4, 12, 4, 12, 12, 4, 12, 12, 12, 4, 4, 4, 4, 12, 4, 12, 4, 4, 4, 12, 4, 4, 12, 12, 12, 4, 4, 4, 12, 12, 12, 4, 12, 4, 12, 12, 12, 12, 12, 4, 4, 4, 4, 4
Offset: 0

Author

Michael Turniansky, Jul 24 2017

Keywords

Comments

Take the sequence A113172. Map it onto itself repeatedly. You will either end up at the fixed point, 12, or a loop of 4->7->8->9->4 (here represented by 4).

Examples

			For example 10, spelled TEN is worth 3 points, THREE is worth 8 points and 8 is in the 4/7/8/9 loop, so a(10)=4
		

Crossrefs

Cf. A113172.

Programs

  • Python
    from num2words import num2words
    def A290205(n):
        f = lambda n:sum((1,3,3,2,1,4,2,4,1,8,5,1,3,1,1,3,10,1,1,1,1,4,4,8,4,10)[a] for d in num2words(n).replace(' and ','') if 0<=(a:=ord(d)-97)<=25)
        while True:
            n = f(n)
            if n in {4,7,8,9,4}: return 4
            if n == 12: return 12 # Chai Wah Wu, Apr 21 2023

A283793 Number of elements formable in <= n steps, starting with 4 elements, combining 2 elements into a new element at each step.

Original entry on oeis.org

4, 14, 109, 5999, 17997004, 161946085486514, 13113267302202731189080679359, 85978889669509647874887802052390686151982448025024665124
Offset: 0

Author

Michael Turniansky, Mar 16 2017

Keywords

Comments

In a game such as Doodle God (see links), you start with Earth, Air, Fire and Water, and combine them two at a time (including combining an element with itself) into new elements. A(n) is the hypothetical maximum number of different possible elements you could reach from clicking at most n times.
This list is akin to A006894, which is the sequence if we started with 1 element instead of 4.

Examples

			Starting with {A, B, C, D}, we can make {AA, AB, AC, AD, BB, BC, BD, CC, CD, and DD}.  The union of these two sets has cardinality 14 = a(1).
		

Crossrefs

Cf. A006894.

Programs

  • Mathematica
    a[0]=4; a[n_] := a[n] = 4 + a[n-1] (a[n-1] + 1)/2; a /@ Range[0, 7] (* Giovanni Resta, Mar 16 2017 *)
  • PARI
    a(n) = if(n<1, 4, 4 + a(n - 1) * (a(n - 1) + 1) / 2);
    for(n=0, 7, print1(a(n),", ")) \\ Indranil Ghosh, Mar 16 2017

Formula

a(n) = 4 + T(a(n-1)) where T(m) is the m-th triangular number.

A261148 Prime-Indexed Primes (PIPs) k such that the sum of all PIPs <= k is a prime.

Original entry on oeis.org

3, 11, 31, 59, 83, 211, 331, 773, 1297, 1433, 1471, 1621, 2027, 2477, 3637, 4153, 4787, 4877, 5623, 7699, 9103, 9619, 11743, 12097, 12959, 13037, 13591, 13709, 14177, 14969, 15299, 16411, 16703, 16921, 19463, 19577, 21379, 22093, 22721, 24107, 24151, 24419, 24509, 24671, 28657
Offset: 1

Author

Michael Turniansky, Aug 10 2015

Keywords

Comments

This is a strict subset of A006450: {k from A006450 | Sum_{j=1..k} A006450(j) is prime}.
It seems from observation that asymptotically a(n)/A006450(n) ~ 7.5*log(n) - e. But might this just be coincidence? I certainly have no proof. - Michael Turniansky, Aug 21 2015

Examples

			11 is in the sequence because A006450(1) + A006450(2) + A006450(3) = 3 + 5 + 11 = 19, a prime number.
		

Crossrefs

Cf. A006450.

Programs

  • Mathematica
    L={}; s=0; p=2; While[Length@L < 100, If[PrimeQ[s+=(q = Prime@p)], AppendTo[L, q]]; p = NextPrime@ p]; L (* Giovanni Resta, Aug 21 2015 *)
  • PARI
    lista(nn) = {s = 0; forprime(p=2, nn, q = prime(p); s += q; if (isprime(s), print1(q, ", ")););} \\ Michel Marcus, Aug 20 2015

A239751 Numbers whose number of nonzero binary digits is less than their number of nonzero decimal digits.

Original entry on oeis.org

16, 32, 64, 128, 129, 132, 136, 144, 192, 256, 257, 258, 264, 272, 288, 384, 512, 513, 514, 516, 528, 544, 576, 768, 1024, 1025, 1026, 1028, 1032, 1056, 1088, 1152, 1153, 1154, 1156, 1168, 1184, 1216, 1280, 1281, 1282, 1284, 1288, 1296, 1312, 1344, 1536, 1537, 1538, 1544, 1552, 1568, 1664
Offset: 1

Author

Michael Turniansky, Mar 26 2014

Keywords

Comments

If Hebrew gematria (A051596) were replaced with a "binary gematria" where aleph=1, bet=2, gimel=4, etc., this sequence would be a subset of "numbers whose binary gematria has fewer letters than their original gematria".

Crossrefs

Programs

  • APL
    ((+⌿(22⍴2)⊤C)<+⌿0≠(5⍴10)⊤C)/C←⍳10000
  • Mathematica
    Select[Range[1664], Less @@ Total /@ Sign /@ IntegerDigits[#, {2, 10}] &] (* Giovanni Resta, Mar 26 2014 *)

Formula

n such that A000120(n)<A055640(n).

A235029 Numbers whose English name requires fewer letters than twice the number of decimal digits.

Original entry on oeis.org

10, 1000000, 1000001, 1000002, 1000006, 1000010, 2000000, 2000001, 2000002, 2000006, 2000010, 3000000, 4000000, 5000000, 6000000, 6000001, 6000002, 6000006, 6000010, 7000000, 8000000, 9000000, 10000000, 10000001, 10000002, 10000003
Offset: 1

Author

Michael Turniansky, Jan 02 2014

Keywords

Comments

This is also the list of numbers whose English name is shorter than their name in the artificial language Lojban.

Formula

Numbers n such that 2*A055642(n) > A005589(n).

Extensions

Comment extended by Georg Fischer, Dec 18 2020

A228158 Numbers n such that the cardinality of (natural numbers <=n with a first digit of 1) = n/2.

Original entry on oeis.org

2, 16, 22, 176, 222, 1776, 2222, 17776, 22222, 177776, 222222, 1777776, 2222222, 17777776, 22222222, 177777776, 222222222, 1777777776, 2222222222, 17777777776, 22222222222, 177777777776, 222222222222, 1777777777776, 2222222222222, 17777777777776
Offset: 1

Author

Michael Turniansky, Aug 14 2013

Keywords

Comments

This is conceptually related to Benford's law.

Programs

  • PARI
    Vec(2*(1+8*x)/((1-x)*(1+x)*(1-10*x^2))+O(x^66)) \\ Joerg Arndt, Aug 14 2013

Formula

a(n) for odd values of n is simply "2" repeated (n+1)/2 times (sum as i=1->(n/2) of 10^(i-1)). For even values of n, it's a(n-1)*8.
G.f.: 2*(1+8*x)/((1-x)*(1+x)*(1-10*x^2)). [Joerg Arndt, Aug 14 2013]

A213394 The difference between n and the product of the digits of the n-th prime.

Original entry on oeis.org

-1, -1, -2, -3, 4, 3, 0, -1, 3, -8, 8, -9, 9, 2, -13, 1, -28, 12, -23, 13, 0, -41, -1, -48, -38, 26, 27, 28, 29, 27, 17, 29, 12, 7, -1, 31, 2, 20, -3, 19, -22, 34, 34, 17, -18, -35, 45, 36, 21, 14, 33, -2, 45, 44, -15, 20, -51, 44, -39, 44, 13, 8, 63, 61, 56
Offset: 1

Author

Michael Turniansky, Jun 28 2012

Keywords

Comments

The first three zeros occur at terms 7, 21 and 181440.

Programs

  • Mathematica
    Table[n - Times @@ IntegerDigits[Prime[n]], {n, 100}] (* T. D. Noe, Jun 28 2012 *)

Formula

a(n) = A000027(n) - A053666(n).