id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

padovan


The first three padovan numbers are 1, 1, and 1. The fourth is 2, the sum of the first two padovan numbers. Each successive padovan number is the sum of the padovan numbers that are 2 and 3 positions earlier in the sequence. The padovan numbers are 1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, 37, 49, 65, 86, 114, 151, 200 and so on.


padovan(0) → 1
padovan(1) → 1
padovan(2) → 1

...Save, Compile, Run (ctrl-enter)

public int padovan(int n){ }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 289

Copyright Nick Parlante 2017 - privacy