Skip to main content
Commonmark migration
Source Link

#Japt, 14 bytes

Japt, 14 bytes

Outputs the first nth term, 1-indexed.

_ì äa dÉ ªU´}f

Try it

(I know, I know, I'm supposed to be taking a break but I'm in golf withdrawal!)

#Japt, 14 bytes

Outputs the first nth term, 1-indexed.

_ì äa dÉ ªU´}f

Try it

(I know, I know, I'm supposed to be taking a break but I'm in golf withdrawal!)

Japt, 14 bytes

Outputs the first nth term, 1-indexed.

_ì äa dÉ ªU´}f

Try it

(I know, I know, I'm supposed to be taking a break but I'm in golf withdrawal!)

deleted 815 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#Japt, 1814 bytes

Outputs the first n terms usingth term, 1-based indexingindexed.

@_ì_äa âÃÉ}fXÄ}h9õ

Try it

@_ì_äa âÃÉ}fXÄ}h9õ     :Implicit input of integer U
                9õ     :Range [1,9]
@             }h       :Run the following function until that reaches length U,
                       :passing the last element as X each time,
                       :and pushing the output each time
            XÄ         :  Add 1 to X
 _      äa  ªU´}f           :  Get the first integer >= to that that returns falsey (0)
  ì                    :    Split to digit array
   _                   :    Run through the following function and rejoin to integer
    äa                 :      Consecutive absolute differences
       â               :      Deduplicate
        Ã              :    End function
         É             :    Subtract 1

Try it

(I know, I know, I'm supposed to be taking a break but I'm in golf withdrawal!)

#Japt, 18 bytes

Outputs the first n terms using 1-based indexing.

@_ì_äa âÃÉ}fXÄ}h9õ

Try it

@_ì_äa âÃÉ}fXÄ}h9õ     :Implicit input of integer U
                9õ     :Range [1,9]
@             }h       :Run the following function until that reaches length U,
                       :passing the last element as X each time,
                       :and pushing the output each time
            XÄ         :  Add 1 to X
 _        }f           :  Get the first integer >= to that that returns falsey (0)
  ì                    :    Split to digit array
   _                   :    Run through the following function and rejoin to integer
    äa                 :      Consecutive absolute differences
       â               :      Deduplicate
        Ã              :    End function
         É             :    Subtract 1

(I know, I know, I'm supposed to be taking a break but I'm in golf withdrawal!)

#Japt, 14 bytes

Outputs the first nth term, 1-indexed.

 äa  ªU´}f

Try it

(I know, I know, I'm supposed to be taking a break but I'm in golf withdrawal!)

added 796 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#Japt, 18 bytes

Outputs the first n terms using 1-based indexing.

@_ì_äa âÃÉ}fXÄ}h9õ

Try it

@_ì_äa âÃÉ}fXÄ}h9õ     :Implicit input of integer U
                9õ     :Range [1,9]
@             }h       :Run the following function until that reaches length U,
                       :passing the last element as X each time,
                       :and pushing the output each time
            XÄ         :  Add 1 to X
 _        }f           :  Get the first integer >= to that that returns falsey (0)
  ì                    :    Split to digit array
   _                   :    Run through the following function and rejoin to integer
    äa                 :      Consecutive absolute differences
       â               :      Deduplicate
        Ã              :    End function
         É             :    Subtract 1

(I know, I know, I'm supposed to be taking a break but I'm in golf withdrawal!)

#Japt, 18 bytes

Outputs the first n terms using 1-based indexing.

@_ì_äa âÃÉ}fXÄ}h9õ

Try it

(I know, I know, I'm supposed to be taking a break but I'm in golf withdrawal!)

#Japt, 18 bytes

Outputs the first n terms using 1-based indexing.

@_ì_äa âÃÉ}fXÄ}h9õ

Try it

@_ì_äa âÃÉ}fXÄ}h9õ     :Implicit input of integer U
                9õ     :Range [1,9]
@             }h       :Run the following function until that reaches length U,
                       :passing the last element as X each time,
                       :and pushing the output each time
            XÄ         :  Add 1 to X
 _        }f           :  Get the first integer >= to that that returns falsey (0)
  ì                    :    Split to digit array
   _                   :    Run through the following function and rejoin to integer
    äa                 :      Consecutive absolute differences
       â               :      Deduplicate
        Ã              :    End function
         É             :    Subtract 1

(I know, I know, I'm supposed to be taking a break but I'm in golf withdrawal!)

Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94
Loading